(maxLen)
| 275 | |
| 276 | // Called when VM wants to read data from the network interface |
| 277 | readFromNetwork(maxLen) { |
| 278 | if (this.txBuffer.length === 0) return null; |
| 279 | |
| 280 | const chunk = this.txBuffer.subarray(0, maxLen); |
| 281 | this.txBuffer = this.txBuffer.subarray(chunk.length); |
| 282 | |
| 283 | return chunk; |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Get the current size of pending data in the TX buffer |
no outgoing calls
no test coverage detected