Just like concurrent tcp server, anyone know how to design the concurrent udp server with the thread? it's best to give some basic examples,thanks (0 Replies)
hello everyone. I tried searching for something related to this, but I figured it was time to ask my own question. I am experiencing these problems using Ubuntu 7.04
I am starting up a TCP listener/server and once connected, will act as a communication/control link with a program on another... (3 Replies)
Problem
- Linux Client/Server Socket Application: Preventing Client from quitting on server crash
Hi,
I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64.
I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Hi all,
I need to change the source port number of an outgoing TCP packet. First I have to bind the socket to a particular port(suppose 9001) but when I send the TCP packet I want to change the source port number lets say to 9002 still letting the socket to be bound to the same old port (9001).... (0 Replies)
Hi All,
I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible.
I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Hello!
I searched forum for similar topic, with no luck, if you know one, delete this topic, and send me private message with link please.
Little background:
I have a lot of clients and one serwer. Client can make multiple connections on different ports and ips, but only one can be acctive... (2 Replies)
hi all my problem is i have programmed a server to accept multiple clients through concurrent server approach
https://lh3.googleusercontent.com/-hg-TSMdDj1k/UG5R7iICXaI/AAAAAAAAC5M/23_NnU5kH94/s800/concserver.png
but when i try to execute the binding and connection accept works fine but the... (1 Reply)
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Hi,
What are the differences between concurrent and enhanced concurrent VGs.?
Any advantages of enhanced concurrent VG over normal concurrent vg
Regards,
Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies
LEARN ABOUT CENTOS
getsockname
GETSOCKNAME(2) Linux Programmer's Manual GETSOCKNAME(2)NAME
getsockname - get socket name
SYNOPSIS
#include <sys/socket.h>
int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
DESCRIPTION
getsockname() returns the current address to which the socket sockfd is bound, in the buffer pointed to by addr. The addrlen argument
should be initialized to indicate the amount of space (in bytes) pointed to by addr. On return it contains the actual size of the socket
address.
The returned address is truncated if the buffer provided is too small; in this case, addrlen will return a value greater than was supplied
to the call.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EBADF The argument sockfd is not a valid descriptor.
EFAULT The addr argument points to memory not in a valid part of the process address space.
EINVAL addrlen is invalid (e.g., is negative).
ENOBUFS
Insufficient resources were available in the system to perform the operation.
ENOTSOCK
The argument sockfd is a file, not a socket.
CONFORMING TO
SVr4, 4.4BSD (the getsockname() function call appeared in 4.2BSD), POSIX.1-2001.
NOTES
The third argument of getsockname() is in reality an int * (and this is what 4.x BSD and libc4 and libc5 have). Some POSIX confusion
resulted in the present socklen_t, also used by glibc. See also accept(2).
SEE ALSO bind(2), socket(2), getifaddrs(3), ip(7), socket(7), unix(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-12-03 GETSOCKNAME(2)