EWrite
EWrite Send a data packet over Ethernet EParamBlkPtr thePBptr; address of an EParamBlock structure Boolean async; 0=await completion; 1=immediate return thePBptr is a pointer to an EParamBlock structure. The relevant fields are as follows:
¨ ioResult short 2 16 Result code
Æ csCode short 2 26 Always ENetWrite
Æ ePointer long 4 30 Pointer to write-data structure
async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to function asynchronously. See Async I/O. noErr (0) No error
eLenErr (-92) Packet too large or first entry of the write-data
structure did not contain the full 14-byte header
excessCollsns (-95) Hardware error
Notes: You must first prepare a write-data structure that specifies the
destination address and the protocol type and contains the data that you want
to send. You place a pointer to the write-data structure in the ePointer
parameter. If you want to send a packet larger than 768 bytes, first call
general-transmission mode. If the size of the packet you provide is less than
60 bytes, the driver adds pad bytes to the packet. Write-data structures are
The ioResult parameter returns the result of the function. If you call the
function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode parameter is a routine selector that is set
automatically for you by the high-level language interface; it is always
equal to ENetWrite for this function