Fork us on GitHub Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 8 years ago

Closed 7 years ago

#276 closed enhancement (notadefect)

Socket client creates callback connections

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.5.0
Component: helenos/net/socket Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Socket client code (uspace/lib/c/generic/net/socket_client.c) creates callback connections to receive packets from the socket providers.

Instead of simply implementing recv()/recvfrom() using blocking IPC calls, the code receives data from sockets via incoming calls from the socket provider (and queuing them).

This is inappropriate and can lead to problems. An application is not a server and need not process incoming calls. Also, if the application does not process the incoming calls, the socket provider could get blocked.

Change History (6)

comment:1 Changed 8 years ago by Jiri Svoboda

Socket client code is implemented in an unusual way. I believe it should be rewritten to simply map BSD socket operations to IPC calls.

comment:2 Changed 8 years ago by Jakub Jermář

Component: unspecifiednet/socket

comment:3 Changed 8 years ago by Jakub Jermář

Milestone: 0.4.30.5.0

comment:4 Changed 8 years ago by Jakub Jermář

Type: defectenhancement

comment:5 Changed 7 years ago by Jiri Svoboda

Since direct IPC calls cannot time out or be aborted (at least not at present), callback might be actually needed.

comment:6 Changed 7 years ago by Jiri Svoboda

Resolution: notadefect
Status: newclosed

I stand corrected. It has been established that there is nothing wrong with callback connections to applications.

Note: See TracTickets for help on using tickets.