Joe Reichman wrote:

> Hi
> I am running a cocurrent server with multiple connections/ports
> When I connect on my first socket/port
> I am able to later on read data as my logic has the read waiting for
> TCP/IP
> To post the ECB whenever the client
> Sends data and the read completes
> The second connection the send immeaditly follows the connect and my
> Read does complete but there is nothing in the buffer (binary zeros)
> It was my understanding that all sockets are in blocking mode thus
> If a client does a send before I able to do a read TCP/IP will hold up
> the works
> As a sidebar would anyone know what the difference is between a read
> and a recv/recvfrom

recv and recvfrom are part of the Berkeley socket interface at least as
defined on Unix systems. However, on Unix (including z/OS Unix) there is
essentially no difference between read and recv, and they can be used
interchangeably on socket descriptors. The same is true with send and
write. On Windows sockets you have to use recv and send because as I
recall a Windows socket descriptor is a very different thing from a file
handle.

recvfrom and sendto are usually used for datagram sockets and although
they can be used for stream sockets as well. recvfrom takes additional
parameters for a sockaddr structure which contains the address of the
sender when recvfrom returns.

>
>
> Thankx in advance
>
> Sent from my iPhone

Regards,
Henry

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to