top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Inconsistency in the socket options: Interesting socket behavior?

+3 votes
79 views

I noticed that if I make a listening socket using SOCK_STREAM | SOCK_NONBLOCK, that the sockets I get after calling listener.accept() dont have the O_NONBLOCK flag set, but checking the result of gettimeout() on the same sockets gives me 0.0, which means they are non blocking. Why is this the case?

posted Oct 7, 2014 by Satish Mishra

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
for which language or socket lib?

Similar Questions
+4 votes

I am hitting the following issue it is still open and there are no suggested workarounds

DFSClient#DFSInputStream#blockSeekTo may leak socket connection.

https://issues.apache.org/jira/browse/HDFS-5493

Can any one know any workaround

+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.?

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

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

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...