Sponsored Content
Special Forums IP Networking Execution Problem with socket Post 302616598 by Neo on Saturday 31st of March 2012 11:52:31 PM
Old 04-01-2012
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
 

10 More Discussions You Might Find Interesting

1. Programming

Socket Problem

Hi all, I have developed server/client application (using C) and tested it on the same machine .. but when I deploy them on different machines I get connection timeout. Well .. server machine and client machine exists on different network segments, so there is a linux firewall box to route... (3 Replies)
Discussion started by: Agent007
3 Replies

2. Programming

Problem Connecting to Socket

Can anyone help? I'm trying to write a program which will write to a socket. I can get the server to run, but always get an error when I try to connect. It gives me an error at the "connect" command. It's probably a simple error, but I can't seem to find it. #include <sys/socket.h>... (6 Replies)
Discussion started by: Stevhp
6 Replies

3. UNIX for Advanced & Expert Users

problem with socket reading

I am not able to receive the message on socket in the current process when its waiting for its child to exit. code looks something like below //in one thread of the current process //thread 1 =============================================== int numBytes = read(sockid,buf,SIZE); //Now the... (2 Replies)
Discussion started by: swap007
2 Replies

4. Programming

and again, socket() related problem...

Dear All, I've searched many topics and googled many web-pages, but still I didn't found solution to this problem. I want to set timeout for connect(). The thing is, that my code works only on BSD, on Linux (tested on SuSE box) it freezes at connect() call :( bool SomeFunc(std::string... (1 Reply)
Discussion started by: sggkxv
1 Replies

5. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

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

Problem with socket connection

I have a client /server file operation program.It works properly when i run the client and server program in the same system.but when i try to run the client in one system and server in another system i am getting an error in the cleint machine as "ERROR:Connection refused". Plz help me in this ... (1 Reply)
Discussion started by: vigneshinbox
1 Replies

7. Programming

Problem with Socket program..

I wrote a program which will send a message to multiple clients(i.e, broadcasting) that are connected to a server.Once when the client receives a message from the server ,the client should read a file in the server and display it in the client.The client which responds (i.e, client wants all the... (3 Replies)
Discussion started by: vigneshinbox
3 Replies

8. Programming

Socket++ library problem.

Hi, My name is Daniel and I'm spanish, so I'm sorry if you can't undertand something becouse of my low-level english. Something stranger is happening to me with socket++ library and I don't know how to work on it. I has a library called commands.so and the sslclient is and object of that... (4 Replies)
Discussion started by: lock.cda
4 Replies

9. Post Here to Contact Site Administrators and Moderators

socket programing-problem with server

hi, i am new to socket programming.i have a problem in server.requirement is it should continuosly read the requests from client(sends requests continuously) and after certain delay(i kept der sleep) should send response. for this i used msgqueues so that after reading it is sending into... (1 Reply)
Discussion started by: chandinisree
1 Replies

10. IP Networking

socket programing-problem with server

hi, i am new to socket programming.i have a problem in server.requirement is it should continuosly read the requests from client(sends requests continuously) and after certain delay(i kept der sleep) should send response. for this i used msgqueues so that after reading it is sending into... (1 Reply)
Discussion started by: chandinisree
1 Replies
GETPEERNAME(2)						     Linux Programmer's Manual						    GETPEERNAME(2)

NAME
getpeername - get name of connected peer socket SYNOPSIS
#include <sys/socket.h> int getpeername(int s, struct sockaddr *name, socklen_t *namelen); DESCRIPTION
Getpeername returns the name of the peer connected to socket s. The namelen parameter should be initialized to indicate the amount of space pointed to by name. On return it contains the actual size of the name returned (in bytes). The name is truncated if the buffer pro- vided is too small. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EBADF The argument s is not a valid descriptor. ENOTSOCK The argument s is a file, not a socket. ENOTCONN The socket is not connected. ENOBUFS Insufficient resources were available in the system to perform the operation. EFAULT The name parameter points to memory not in a valid part of the process address space. CONFORMING TO
SVr4, 4.4BSD (the getpeername function call first appeared in 4.2BSD). NOTE
The third argument of getpeername is in reality an `int *' (and this is what BSD 4.* and libc4 and libc5 have). Some POSIX confusion resulted in the present socklen_t. The draft standard has not been adopted yet, but glibc2 already follows it and also has socklen_t. See also accept(2). SEE ALSO
accept(2), bind(2), getsockname(2) BSD Man Page 1993-07-30 GETPEERNAME(2)
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy