top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In socket programming why bind system call is only on server side not on client side.?

+1 vote
1,825 views
In socket programming why bind system call is only on server side not on client side.?
posted Mar 17, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

We need to see the purpose of this - when we using the socket at the server side we need to advertise to the rest of the world (read client) so that client can connect to it to specific IP and port, whereas there is no such requirement at the client side. That is the reason Server has to bind to a specific address and to listen a specific port.

answer Mar 17, 2015 by Salil Agrawal
Similar Questions
0 votes

is it for No of connection can be accepted?
or is it for no of client can be in queue while SFD is busy..?

i have kept 0 as an argument in listen, still it is taking 10 connection..
but if i remove listen then it is showing an error..

Can anybody please help in this?

Thanks in advance

+2 votes

As per my understanding Receive system calls will be a blocking call of the code... it will not go ahead unless it receives the response from client .. my question is how would i set time in that? i want my code should wait only for few seconds then it has to come out from that

+1 vote

Is it right that it is used to bind Port number with IP?
If it is, then What is the need of binding it? and Why it is not present in UDP?
And also, What is the use of listen(5) ?
Does it mean that server can be connected maximum to 5 client? or it means that if server is busy with other client then 5 more client can be in queue.?
and also, What is the use of select() ?
As far as i know it is used when we want to monitor continuously input/output for that particular file descriptor.
is it correct?
If yes, then why it is used only when accepting connection request from multiple client.?

+1 vote

In Socket-Programming, I want to send whole ".txt" file from server to client. is it possible?

+2 votes

For An Example:
I have Socket-Programming where server is connected to 5 clients and it continuously sends and receives to all the clients.
Now, If one of the client looses the network or in whatever the case one of the client fails then master will also fail and because of it all other client will also be failed.

...