09-30-2008
socket programming doubt
can we create multiple sockets in a machine with different ip addresses and all port listen to one single port ????
i hav one tool which creates virtual interface and i m using that to create multiple ip addresses in a linux machine and i use thos eip addresses to create multiple sockets and all ports shld listen to a single poer ... i got an error like (98, Address already in use ) . i can able to listen those sockets in differnt port with out any prob ...wat could be issue ..can anyone sole this issue
10 More Discussions You Might Find Interesting
1. Programming
Dear Reader,
Is there any way to check up socket status other than 'netstatus '
Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies
2. Programming
Hello,
I actually try to make client-server program.
I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error :
I'm just using this simple code :
and I get the same error if I use :
If someone can help me,
Thanks (2 Replies)
Discussion started by: soshell
2 Replies
3. IP Networking
my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing...
how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies
4. IP Networking
Hello Everyone
Iam working on tcp/ip programming.with some time interval server has to send data.client has to close the connection and to open the connection between the time interval.this is the scenario
when iam closing the connection in client side the connection terminates.how to... (1 Reply)
Discussion started by: sureshvaikuntam
1 Replies
5. UNIX for Advanced & Expert Users
can we send udp message to a destination ip address .. without having an ip address configured in our machine using recvfrom ? (2 Replies)
Discussion started by: Gopi Krishna P
2 Replies
6. UNIX for Dummies Questions & Answers
in socket programming how can i : Create for example 3 blank files, namely: server, client, network
•Server: act as servers/provider, will receive all requests from different client
•Client: requesters
•Network: middle-layer of communication between server & client
any tips or... (6 Replies)
Discussion started by: kedah160
6 Replies
7. Programming
i'm doing a simple program in socket programming on c i have server that can handle 2clients in a single machine i'm running ubuntu linux so i got it work but the probelm when clients send a message the server will echo it but i cant distinguish which client send the message client 1 or client... (7 Replies)
Discussion started by: kedah160
7 Replies
8. UNIX for Advanced & Expert Users
my socket program is not working with larger port numbers like more than 60000 , any reason why ? (4 Replies)
Discussion started by: Gopi Krishna P
4 Replies
9. Programming
I am aware that TCP sockets are stream based and a single write may not send all the data. Is this the case with recv as well ?
I am in process of deciding a protocol to handle communication. I wanted some tips as to handle transactions. The data sent / received would be fixed length. Hence... (5 Replies)
Discussion started by: _korg
5 Replies
10. Ubuntu
HI
Can anyone provide me with codes for file transfer server to client or vice versa?
Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming.
Thanks (1 Reply)
Discussion started by: mayhemtrigger
1 Replies
LEARN ABOUT ULTRIX
rpc_use_family
rpc_use_family(3ncs) rpc_use_family(3ncs)
Name
rpc_use_family - create a socket of a specified address family for a remote procedure call (RPC) server (server only)
Syntax
#include <idl/c/rpc.h>
void rpc_$use_family(family, sockaddr, slength, status)
unsigned long family;
socket_$addr_t *sockaddr;
unsigned long *slength;
status_$t *status;
Arguments
family The address family of the socket to be created. The value must be one of socket_$internet or socket_$unspec.
sockaddr The socket address of the socket on which the server will listen.
slength The length, in bytes, of sockaddr.
status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it was
successful.
Description
The routine creates a socket for a server without specifying its port number. The RPC runtime software assigns a port number. If a server
must listen on a particular well-known port, use to create the socket.
A server listens on one socket per address family, regardless of how many interfaces that it exports. Therefore, servers should make this
call once per supported address family.
Examples
The following statement creates a server's socket:
rpc_$use_family (family, &saddr, &slen, &status);
Diagnostics
This section lists status codes for errors returned by this routine in
rpc_$cant_create_sock
The RPC runtime library was unable to create a socket.
rpc_$not_in_call An internal error.
rpc_$proto_error An internal protocol error.
rpc_$too_many_sockets
The server is trying to use more than the maximum number of sockets that is allowed; it has called or too many times.
rpc_$addr_in_use The address and port specified in an routine are already in use. This is caused by multiple calls to with the same
well-known port.
Files
See Also
intro(3ncs), rpc_use_family_wk(3ncs)
rpc_use_family(3ncs)