xlang v5.1 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
DatagramSocket类 参考
DatagramSocket 的协作图:
Collaboration graph

Public 成员函数

静态 Public 成员函数

静态 Public 属性

详细描述

DatagramSocket 类,用于实现数据报套接字通信 提供了创建UDP套接字、绑定地址端口、收发数据等功能

在文件 DatagramSocket.x5 行定义.

构造及析构函数说明

◆ DatagramSocket()

成员函数说明

◆ available() [1/2]

long available ( bool  )

◆ available() [2/2]

int available ( long  ,
int   
)

◆ bind()

bool bind ( String  ,
int   
)

◆ close()

void close ( )

◆ connect()

bool connect ( String  ,
int   
) throws IllegalArgumentException

◆ finalize()

void finalize ( )

◆ getHandle()

long getHandle ( )

◆ getKeepAlive()

bool getKeepAlive ( )

◆ getLocalInetAddress()

InetAddress getLocalInetAddress ( )

◆ getLocalIpAddress()

String getLocalIpAddress ( )

◆ getLocalPort()

int getLocalPort ( )

◆ getRecvBufferSize()

int getRecvBufferSize ( )

◆ getRemoteInetAddress()

InetAddress getRemoteInetAddress ( )

◆ getRemoteIpAddress()

String getRemoteIpAddress ( )

◆ getRemotePort()

int getRemotePort ( )

◆ getReuseAddress()

bool getReuseAddress ( )

◆ getSendBufferSize()

int getSendBufferSize ( )

◆ isListenning()

bool isListenning ( )

◆ read()

int read ( byte  [],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

◆ receive()

bool receive ( DatagramPacket  )

◆ select()

static final int select ( DatagramSocket  [],
int  ,
int  ,
int  ,
int  [],
int   
) throws IndexOutOfBoundsException, IllegalArgumentException, InterruptedException
static

◆ send()

bool send ( DatagramPacket  )

◆ sendTo() [1/2]

int sendTo ( InetAddress  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

◆ sendTo() [2/2]

int sendTo ( String  ,
int  ,
  byte[],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

◆ setBroadcast()

void setBroadcast ( bool  )

◆ setKeepAlive()

bool setKeepAlive ( bool  )

◆ setPromiscuousMode()

bool setPromiscuousMode ( bool  )

◆ setRecvBufferSize()

bool setRecvBufferSize ( int  )

◆ setReuseAddress()

void setReuseAddress ( bool  )

◆ setSendBufferSize()

bool setSendBufferSize ( int  )

◆ setSoTimeout()

bool setSoTimeout ( int  )

◆ write()

int write ( byte  [],
int  ,
int   
) throws IndexOutOfBoundsException, IllegalArgumentException

结构体成员变量说明

◆ FLAGS_EXCEPTION

const int FLAGS_EXCEPTION
static

在文件 DatagramSocket.x10 行定义.

◆ FLAGS_READABLE

const int FLAGS_READABLE
static

在文件 DatagramSocket.x8 行定义.

◆ FLAGS_WRITEABLE

const int FLAGS_WRITEABLE
static

在文件 DatagramSocket.x9 行定义.