Type | Wish | Status | reviewed | Date | 15-Apr-2014 18:36 |
---|---|---|---|---|---|
Version | r3 master | Category | Ports | Submitted by | szeng |
Platform | All | Severity | minor | Priority | normal |
Summary | Full duplex support in port |
---|---|
Description | Currently, only a device (net, clipboard, file, etc) can have a request pending list, and each request in the pending list is constructed from port/state, which means a port can have only one pending request. So a port can't read while it still has data in the buffer to write. It has to check if the previous request is done before issuing a new one, which can only be reliably done in "awake". This is not a problem if you've already got the next request ready when the current request is done. However, it's not usually the case, you will often need to read/write data outside of "awake" function. |
Example code |
p: open tcp://localhost:4321 p/awake: func [evt][ switch evt/type [ lookup [ open evt/port] connect [] read [] wrote [] ] ] write p big-data ;longer than 32000 bytes read p ;this will make big-data not sent completely. close p |
Assigned to | n/a | Fixed in | - | Last Update | 22-Jun-2014 03:12 |
---|
Comments | |
---|---|
(0004463)
BrianH 22-Jun-2014 03:12 |
Yup, that sounds like it might need a bit of rethinking, as long as we don't break the model or lose the efficiency. |
Date | User | Field | Action | Change |
---|---|---|---|---|
22-Jun-2014 03:12 | BrianH | Comment : 0004463 | Added | - |
22-Jun-2014 03:11 | BrianH | Summary | Modified | Full duplex suspport in port => Full duplex support in port |
22-Jun-2014 03:11 | BrianH | Code | Modified | - |
22-Jun-2014 03:11 | BrianH | Status | Modified | submitted => reviewed |
15-Apr-2014 18:36 | szeng | Ticket | Added | - |