Skip to content

closeUDP

Jason Watkins edited this page Apr 26, 2015 · 4 revisions

Closes the specified connection and releases resources associated with it.

Syntax

Language Signature
C void closeUDP(XPCSocket sock)
MATLAB closeUDP(socket)
Java void close()
Python close(self)
Parameters

sock/socket (C, MATLAB): The socket to close.

Remarks

It is not strictly necessary to call close for the Java and Python clients, however not doing so will result in the socket used by the client remaining bound until the client object is garbage collected.

Whenever possible, the Java client should follow the "try with resources" pattern.

Exceptions

C Error Code Java Exception Python Error Description
None

Example

See openUDP.