Need help with 4.2 Socket Communications
Dave Mason
mason at utcsri.UUCP
Mon Apr 1 08:08:03 AEST 1985
I am attempting to use the 4.2 Sockets communication system.
I am trying to use DATAGRAM sockets in the Unix domain and am having
some problems. The server looks like:
s = socket(...
bind(s,...
...
if (recvfrom(s,buf,buflen,0,&from,&fromlen)<0) ...
... process the data ...
if (sendto(s,buf,buflen,0,&from,fromlen)<0) {
perror(...
abort
}
the client looks like:
sc = socket(...
connect(sc,...
if (send(s,...
if (recv(s,...
The message gets sent properly and received by the server, but the
sendto fails with the ENOTSOCK claiming that the socket s is no longer
a socket. Could someone explain to me (by mail please, I can no longer
find the time to read net.unix-wizards) why this would be, and what I
can do about it.
Thanks ../Dave
--
Usenet: {dalcs dciem garfield musocs qucis sask titan trigraph ubc-vision
utzoo watmath allegra cornell decvax decwrl ihnp4 uw-beaver}
!utcsri!mason Dave Mason, U. Toronto CSRI
CSNET: mason at Toronto
ARPA: mason%Toronto at CSNet-Relay
More information about the Comp.unix.wizards
mailing list