Sockets - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : Network Communication : Sockets Package : Sockets/Write

Sockets

  

Write

  

write textual data to a socket connection

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Write(sid, text)

Parameters

sid

-

valid open socket ID

text

-

string; textual data to write to the socket

Description

• 

The procedure Write is used to write textual data, in the form of Maple strings, to a socket connection.

• 

The argument sid is a valid socket ID for an open socket connection. The argument text is the data (in the form of a Maple string) that is written to the socket connection.

• 

Write attempts to write all the data in the text argument to the socket indicated by sid. If the write operation is successful, the value true is returned. Otherwise, Write returns the value false.

  

Note: The text data cannot contain null bytes. You can write binary data to a socket connection by using the procedure Sockets[WriteBinary].

Examples

withSockets:

sidOpenlocalhost,echo

0

(1)

Writesid,Some data to send to the echo server

36

(2)

Readsid

Some data to send to the echo server

(3)

Closesid

true

(4)

See Also

socket definition

Sockets

Sockets[Read]

Sockets[WriteBinary]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam