09-22-2010
You are enabling non-blocking IO on the socket with ioctl(), meaning, the program won't necessarily wait for it to finish(i.e. block). If you want it to wait for it, don't do that.
10 More Discussions You Might Find Interesting
1. IP Networking
:cool:
I want to use 2 tcp applications in SCO 5.05 senerio I am using
VisionFS 3.1 and I need to set it up as a secondary tcp app. I follow the profeditoir and change the tcp port from the primary port (139) to any other number below port 1024 and then restart the VisionFS server it is still... (2 Replies)
Discussion started by: lanman
2 Replies
2. UNIX for Dummies Questions & Answers
If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies
3. UNIX for Dummies Questions & Answers
Hello, I have a service running (ODBC) and every now and then it will hang and I will have to stop and restart the service. The problem is when I stop the service, it indeed stops the service, but netstat reports a tcp port still open with the fin_wait_2 status. Then I must close the client... (1 Reply)
Discussion started by: raidzero
1 Replies
4. Programming
Hi all,
I'm writing a socket program which sends a structure from one machine to another. When I run my client first time it runs well, however after the first time I couldn't receive all the data inside the structure (it is like, half of the array is received and the other half is not set). I... (1 Reply)
Discussion started by: SaTYR
1 Replies
5. Programming
Hello. I would like to know how to close an existing tcp socket. I have read some stuff and learned how to create a socket and then close it but have not found anything about how to close an existing tcp socket created by another application. The situation is this: I have an ODBC server running and... (6 Replies)
Discussion started by: raidzero
6 Replies
6. Solaris
Hi,
I use solaris Unix .
I find there is some problem in application and it generate many "close-wait" tcp connect and stay in the server . it is generate by process id 7740
root@XX # netstat -an | grep CLOSE_WAIT | wc -l
285
root@XX # netstat -an | grep CLOSE_WAIT
10.158.35.4.34805 ... (2 Replies)
Discussion started by: abcdef
2 Replies
7. Programming
can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies
8. IP Networking
Hello All,
I am very new to socket programming and client server architecture. I have to write a client which will send some data to server and server will display it on its console. I am ready with both client and server but my problem is with packetizing of data --
I have... (1 Reply)
Discussion started by: anand.shah
1 Replies
9. Shell Programming and Scripting
Hi
I want to write a script that will back up one directory if a certain application launches and then backs up another directory if that same application is closed down.
NFI where to start. It seems like cron isn't the tool for this because that is time based. I'm thinking I need... (6 Replies)
Discussion started by: zorrokan
6 Replies
10. UNIX for Advanced & Expert Users
Good morning, I need your help please
After Restarting Aps or connection, these are connections
tcp 0 0 10.80.1.26.57597 10.81.248.79.53008 ESTABLISHED
tcp 0 47 10.80.1.26.57607 10.81.248.79.53008 ESTABLISHED
tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies
udp(7) Miscellaneous Information Manual udp(7)
NAME
udp - Internet user datagram protocol (UDP)
SYNOPSIS
#include <sys/socket.h> #include <netinet/in.h>
The following is the socket call for AF_INET sockets:
s = socket(AF_INET, SOCK_DGRAM, 0); The following is the socket call for AF_INET6 sockets:
s = socket(AF_INET6, SOCK_DGRAM, 0);
DESCRIPTION
UDP is a simple, unreliable datagram protocol that is used to support the SOCK_DGRAM abstraction for the Internet Protocol family. UDP
sockets are connectionless, and are normally used with the sendto() and recvfrom() functions, though the connect() function may also be
used to fix the destination for future packets, in which case the recv() or read() and send() or write() functions may be used.
UDP address formats are identical to those used by TCP. In particular, UDP provides a port identifier in addition to the normal Internet
address format. Note that the UDP port space is separate from the TCP port space (that is, a UDP port may not be "connected" to a TCP
port). In addition, IPv4 broadcast packets may be sent (assuming the underlying network supports this) by using a reserved "broadcast
address"; this address is network interface dependent. There is no broadcast address in IPv6.
Options at the IP transport level may be used with UDP; see the ip() reference page.
ERRORS
If a socket operation fails, errno may be set to one of the following values: An attempt was made to create a socket with a port that has
already been allocated. An attempt was made to create a socket with a network address for which no network interface exists. The socket
is already connected. This error occurs when trying to establish connection on a socket or when trying to send a datagram with the desti-
nation address specified. The system ran out of memory for an internal data structure. The destination address of a datagram was not
specified, and the socket has not been connected.
RELATED INFORMATION
Functions: getsockopt(2), recv(2), send(2), socket(2)
Files: netintro(7), inet(7), ip(7) delim off
udp(7)