LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: Adriel Kind <akind@SPRI.Levels.UniSA.Edu.Au>
To : <linuxsa@linuxsa.org.au>
Date: Tue, 24 Jul 2001 11:37:19 +0930
TCP sockets
Hi
I'm trying to set up a TCP/IP stream between 2 processes as part of a
research project. The code is written in C and run on linux machines in
a university LAN.
I've opened a TCP socket, and used the bind, listen, connect, and accept
kernel calls successfully, but when i try to receive data using the
recv() call i get the perror message 'Invalid argument'. The arguments
all match those specified in the man pages.
If anyone has had any experience with this type of programming perhaps
they've come across this problem before. The offending line is
if(( n = recv( tcp_sock, buf, 0xffff, 0)) == -1){
where tcp_sock is an int, and buf is a char array.
Any advice or relevant source code fragments would be extremely helpful,
as i've been stuck on this for a week.
Thanks in advance,
Adriel
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page