• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
data not arriving at client (bsd-sockets)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

data not arriving at client (bsd-sockets)


  • Subject: data not arriving at client (bsd-sockets)
  • From: Robert Kuilman <email@hidden>
  • Date: Sun, 18 May 2003 17:16:04 +0200

Hey all!

I've been working on a client/server application (communicating between
MacOS X(client) and Linux(server))

This Application sends over structures (no worries about byte-ordering
and all, they're both mac). But there seems to be
a problem.

C: send packet
S: reply
C: receive packet
C: process data.

that seems normal... but then when i send another packet, i have to
'ask' for it twice.
like this:

C: send packet
S: reply
C: receive packet <no data>
C: receive packet
C: process data

the code i use for receiving data is as follows.

bzero(buffer, buffer_size);

bytes_read = read(mySocket, buffer, buffer_size );

bytes_read inidicates says it received 2048 bytes (size of my struct)
but there's simply nothing in there!
the second time i call this code, it does receive data...

replacing the 'read' function with standard 'recv' doesnt make a diff.

This gives me the idea, the tcp-buffer should be pushed or something,
anyone has a clue as to what the sollution
to my problem could be ?

Thanks In Advance :-)

Robert K.

web: http://halfduplex.net/
email: email@hidden
------------------------------------------------------------------------
---------------------
"If everything seems to be going well, you have obviously overlooked
something."
- Steven Wright
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: data not arriving at client (bsd-sockets)
      • From: Quinn <email@hidden>
    • Re: data not arriving at client (bsd-sockets)
      • From: Chilton Webb <email@hidden>
  • Prev by Date: Re: SCF/scutil
  • Next by Date: Re: data not arriving at client (bsd-sockets)
  • Previous by thread: Re: SCDynamicStoreCopyDHCPInfo & multiple DHCP servers
  • Next by thread: Re: data not arriving at client (bsd-sockets)
  • Index(es):
    • Date
    • Thread