Opened 14 years ago
Closed 13 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 by , 14 years ago
comment:2 by , 14 years ago
Component: | unspecified → net/socket |
---|
comment:3 by , 14 years ago
Milestone: | 0.4.3 → 0.5.0 |
---|
comment:4 by , 14 years ago
Type: | defect → enhancement |
---|
comment:5 by , 13 years ago
Since direct IPC calls cannot time out or be aborted (at least not at present), callback might be actually needed.
comment:6 by , 13 years ago
Resolution: | → notadefect |
---|---|
Status: | new → closed |
I stand corrected. It has been established that there is nothing wrong with callback connections to applications.
Socket client code is implemented in an unusual way. I believe it should be rewritten to simply map BSD socket operations to IPC calls.