04-01-2010
Thank you. Suggestions worked.
Last edited by cyler; 04-02-2010 at 06:00 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I encountered a stange problem while doing a perl script to use socket. i need to transfer a file from client to sever. but error came as argument missing in send function.........Plz tell me the wt r the arguments in send and recv functions....... (0 Replies)
Discussion started by: trupti_rinku
0 Replies
2. Programming
hello socket programming expert,
I having difficulties in understanding how select() function in socket programming work.... I'm trying to create my own peer-to-peer chat or file transfer program by using the select() function.... Therefore does anyone had any tutorial or source code that... (4 Replies)
Discussion started by: draggy
4 Replies
3. Programming
Hello All,
I have a problem using connect(...) function in C++. I am using SSH from my windows system to connect it to linux server. The program works fine if I run it directly in Linux machine but I need it to run through windows machine.
The function returns -1 and so my program terminates.
... (3 Replies)
Discussion started by: smdhd3
3 Replies
4. Programming
Hi,
I have a client-server socket program. It has been working fine for over a year, but recently it started to show strange behavior.:confused:
After the server program runs for a while, it will show in the top command saying it is using lots of CPU, MEM. I assume it means the server code is... (1 Reply)
Discussion started by: natxie
1 Replies
5. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
6. Programming
Hi all,
On the server side, one socket is used for listening, the others are used for communicating with the client.
My question is: if i want to set option for socket, which socket should be set on?
If either can be set, what's the different?
Again, what's the different if set option... (1 Reply)
Discussion started by: blademan100
1 Replies
7. Programming
Dear Experts,
i am compiling my code in suse 4.1 which is compiling fine,
but at runtime it is showing me for socket programming error no 88
as i searched in errno.h it is telling me socket operation on non socket,
what is the meaning of this , how to deal with this error , please... (1 Reply)
Discussion started by: vin_pll
1 Replies
8. IP Networking
I need clarification on whether it is okay to set socket options on a listening socket
simultaneously when it is being used in an accept() call?
Following is the scenario:-
-- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies
9. Shell Programming and Scripting
Hello all,
I have a requirement to read and write to a tcp socket from an HP-UX shell script. I see a /dev/tcp character device on my servers:
crw-rw-rw- 1 root root 72 0x00004f Mar 28 18:37 /dev/tcp
So I believe this is what I should use. The problem is that all the... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies
10. Programming
hello
I have a C program and I want to read data from a socket ,and especially I want a client to send a .jpg to the server.The problem I face is that no matter what the size of the photo is,my read command seems to read an amount of data and then does nothing.
while(1){
... (4 Replies)
Discussion started by: vlm
4 Replies
LEARN ABOUT SUNOS
sockatmark
sockatmark(3XNET) X/Open Networking Services Library Functions sockatmark(3XNET)
NAME
sockatmark - determine whether a socket is at the out-of-band mark
SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ]
#include <sys/socket.h>
int sockatmark(int s);
DESCRIPTION
The sockatmark() function determines whether the socket specified by the descriptor s is at the out-of-band data mark. If the protocol for
the socket supports out-of-band data by marking the stream with an out-of-band data mark, the sockatmark() function returns 1 when all data
preceding the mark has been read and the out-of-band data mark is the first element in the receive queue. The sockatmark() function does
not remove the mark from the stream.
RETURN VALUES
Upon successful completion, the sockatmark() function returns a value indicating whether the socket is at an out-of-band data mark. If the
protocol has marked the data stream and all data preceding the mark has been read, the return value is 1. If there is no mark, or if data
precedes the mark in the receive queue, the sockatmark() function returns 0. Otherwise, it returns -1 and sets errno to indicate the error.
ERRORS
The sockatmark() function will fail if:
EBADF The s argument is not a valid file descriptor.
ENOTTY The s argument does not specify a descriptor for a socket.
USAGE
The use of this function between receive operations allows an application to determine which received data precedes the out-of-band data
and which follows the out-of-band data.
There is an inherent race condition in the use of this function. On an empty receive queue, the current read of the location might well be
at the "mark", but the system has no way of knowing that the next data segment that will arrive from the network will carry the mark, and
sockatmark() will return false, and the next read operation will silently consume the mark.
Hence, this function can only be used reliably when the application already knows that the out-of-band data has been seen by the system or
that it is known that there is data waiting to be read at the socket, either by SIGURG or select(3C).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
recv(3XNET), recvmsg(3XNET), select(3C), attributes(5), standards(5)
SunOS 5.10 1 Oct 2003 sockatmark(3XNET)