Opened 12 years ago

Last modified 12 years ago

#456 closed defect

Cannot receive and send over TCP/UDP at the same time — at Initial Version

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

The socket client code for recv()/accept() works in a non-blocking fashion: the socket provided sends a notification that new data/connection has arrived and the client calls recv/accept IPC method, which returns immediately.

In current TCP/UDP reception is blocking. This is adapted to the socket API using a hack: a fake notification is sent in advance, the client, when recv()/accept() is called, immediately proceeds to the IPC call, which blocks until data/connection actually arrives.

The problem:

  • while in IPC call for recv()/accept() the socket client code holds the global socket lock
  • while in {tcp|udp}_uc_recv() the socket provider code holds the socket lock

This means it is not possible to send data while being blocked in recv() at the same time. It is also not possible to wait for data from multiple connections simultaneously (i.e. serve multiple connections from a single task).

Change History (0)

Note: See TracTickets for help on using tickets.