public class NetExtension extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DNS_ECONNREFUSED
Could not contact DNS servers (122)
|
static int |
DNS_EDESTRUCTION
Application terminated lookup (123)
|
static int |
DNS_EINVALIDPARAM
Domain name is too long (124)
|
static int |
DNS_EINVALIDSERVER
Canonical Name Loop (125)
|
static int |
DNS_ENODATA
DNS server returned answer with no data (120)
|
static int |
DNS_ETIMEOUT
Timeout while contacting DNS servers (121)
|
static int |
DNS_UNDEFINED
Undefined DNS error (126)
|
static int |
EACC
permission denied (28)
|
static int |
EADDRINUSE
The address is already in use (12)
|
static int |
EADDRNOTAVAIL
Cannot assign requested address (29)
|
static int |
EAFNOSUPPORT
Address family not supported by protocol (30)
|
static int |
EALREADY
A previous attempt at this operation is still ongoing (7)
|
static int |
EBADF
Invalid socket descriptor (2)
|
static int |
ECONNABORTED
An established connection was aborted, possibly
due to a data transmission time-out or protocol
error (14)
|
static int |
ECONNCLOSE
Remote peer has closed the connection (48)
|
static int |
ECONNREFUSED
Remote host has rejected the connection (21)
|
static int |
ECONNRESET
Remote host has reset the connection (15)
|
static int |
EDESTADDRREQ
Socket is not bound (8)
|
static int |
EFAULT
Bad address specified (3)
|
static int |
EHOST_NOT_FOUND
Host not found (24)
|
static int |
EHOSTDOWN
Host is down (31)
|
static int |
EHOSTUNREACH
Remote host is unreachable (22)
|
static int |
EINPROGRESS
Operation now in progress (32)
|
static int |
EINTR
Interrupted system call (33)
|
static int |
EINVAL
Invalid operation (4)
|
static int |
EISCONN
The socket is already connected (17)
|
static int |
EMFILE
No free socket descriptors (5)
|
static int |
EMSGSIZE
The supplied buffer was too large / small (9)
|
static int |
ENETDOWN
The network is unavailable (13)
|
static int |
ENETRESET
Network dropped connection because of reset (34)
|
static int |
ENETUNREACH
Network is unreachable (35)
|
static int |
ENOBUFS
No buffer space available (16)
|
static int |
ENOERROR
No error set (0)
|
static int |
ENOPROTOOPT
Protocol not available (36)
|
static int |
ENOTCONN
The socket is not connected (18)
|
static int |
ENOTSOCK
Socket operation on non-socket (37)
|
static int |
ENOTSUPP
Flags not supported (10)
|
static int |
EOK
No socket error (0)
|
static int |
EOPNOTSUPP
Operation not supported (11)
|
static int |
EPFNOSUPPORT
Protocol family not supported (38)
|
static int |
EPROTONOSUPPORT
Protocol not supported (39)
|
static int |
EPROTOTYPE
Protocol wrong type for socket (40)
|
static int |
ESHUTDOWN
Socket has been shutdown (19)
|
static int |
ESOCKTNOSUPPORT
Socket type not supported (41)
|
static int |
ETIMEDOUT
Connection timed out (20)
|
static int |
EUNEXPECTED
An unexpected error occurred (23)
|
static int |
EWOULDBLOCK
The operation would block (6)
|
static int |
INTERNAL_NETWORK_ERROR
Internal error
|
static int |
PDP_BADF
invalid descriptor for PDP context (88)
|
static int |
PDP_CANNOTOBTAINCTX
cannot obtain new context for PDP context (89)
|
static int |
PDP_CHAP_AUTH_FAILED
CHAP authentification failed for PDP context (86)
|
static int |
PDP_CONNECT_FAILED
PDP connection failed for PDP context (94
|
static int |
PDP_INTERNAL1
internal error for PDP context (90)
|
static int |
PDP_INTERNAL2
internal error for PDP context (91)
|
static int |
PDP_INTERNAL3
internal error for PDP context (93)
|
static int |
PDP_INTERNAL4
internal error for PDP context (95)
|
static int |
PDP_INTERNAL5
internal error for PDP context (99)
|
static int |
PDP_IPCP_FAILED
IPCP error for PDP context (87)
|
static int |
PDP_LCP_FAILED
LCP error for PDP context (84)
|
static int |
PDP_NETWORK_NOT_UP
network could not start for PDP context (98)
|
static int |
PDP_NO_AUTH_REQ
no auth request possible for PDP context (92)
|
static int |
PDP_NO_DNS_RECEIVED
no DNS received for PDP context (100)
|
static int |
PDP_NO_IP_RECEIVED
no IP address received for PDP context (96)
|
static int |
PDP_NO_NETWORK_ID
no network ID received for PDP context (97)
|
static int |
PDP_PAP_AUTH_FAILED
PAP authentification failed for PDP context (85)
|
static byte |
SOCK_MAX_RETR
SocketConnection additional
Socket option for the max number of retries for a tcp packet,
except SYN packets (see SYNCACHE_REXMTLIMIT for SYN packets) (37).
|
static byte |
SOCK_SNDTIMEO
Socket optione for the overall packet retry timeout in ms (36).
|
static byte |
SOCK_SYNCACHE_MAXTIMEOUT
SocketConnection additional
Socket option for the max retry timeout between SYN packet
retries: Limit max timeout in ms between SYN packets (40).
|
static byte |
SOCK_SYNCACHE_REXMTLIMIT
SocketConnection additional
Socket option for the max number of retries for a tcp
SYN packet (39).
|
static byte |
SOCK_UACK
SocketConnection additional
Socket option for he number of unacknowledged data for a
tcp socket (38).
|
Modifier and Type | Method and Description |
---|---|
static int |
GetTcpIRT()
Get TCP initial retransmission timeout for this midlet, if set with SetTcpIRT
|
static int |
GetTcpNR()
Get TCP number of retransmissions for this midlet, if set with GetTcpNR
|
static int |
GetTcpOT()
Get TCP retransmission overall timeout for this midlet, if set with GetTcpOT
|
static int |
GetTcpSMRT()
Get TCP SYN packet retransmission overall timeout for this midlet, if set with SetTcpSMRT
|
static int |
GetTcpSNR()
Get number of TCP SYN packet retransmissions for this midlet, if set with SetTcpSNR
|
static String |
HostbyAddr(String Hostaddr)
retrieve the DNS name from a Hosts IP address in dotted notation (aaa.bbb.ccc.ddd)
|
static String |
Hostname(String Host)
retrieve IP address of Host as String in dotted notation (aaa.bbb.ccc.ddd)
|
static int |
LastNetError()
Retrieve and reset the last occurred network error for the current thread.
|
static int |
Ping(String Host)
ping host
|
static int |
Ping(String Host,
int Timeout)
ping host
with timeout in ms,
|
static int |
Ping(String Host,
int Timeout,
int NumPings)
ping host
with NumPings packets,
timeout for every packet in ms,
|
static int |
Ping(String Host,
int Timeout,
int NumPings,
int Size)
ping host
with NumPings packets,
with Size bytes content,
timeout for every packet in ms,
|
static int |
Ping(String Host,
int Timeout,
int NumPings,
int Size,
int Delay)
ping host
with NumPings packets,
with Size bytes content,
timeout for every packet in ms,
Delay delay between each packet,
|
static int |
Ping(String Host,
int Timeout,
int NumPings,
int Size,
int Delay,
int Ttl)
ping host
with NumPings packets,
with Size bytes content,
timeout for every packet in ms,
Delay delay between each packet,
Ttl TTL
|
static int |
Ping(String Host,
int Timeout,
int NumPings,
int Size,
int Delay,
int Ttl,
PingResponse Response)
ping host
with NumPings packets,
with Size bytes content,
timeout for every packet in ms,
Delay delay between each packet,
Ttl TTL
|
static void |
SetTcpIRT(int irt)
Set TCP initial retransmission timeout for every next opened socket of this midlet
|
static void |
SetTcpNR(int nr)
Set TCP number of retransmissions for every next opened socket of this midlet
|
static void |
SetTcpOT(int ot)
Set TCP retransmission overall timeout for every next opened socket of this midlet.
|
static void |
SetTcpSMRT(int smrt)
Set TCP SYN packet retransmission overall timeout for every next opened socket of this midlet
|
static void |
SetTcpSNR(int snr)
Set TCP number of SYN packet retransmissions for every next opened socket of this midlet
|
public static final byte SOCK_SNDTIMEO
public static final byte SOCK_MAX_RETR
public static final byte SOCK_UACK
public static final byte SOCK_SYNCACHE_REXMTLIMIT
public static final byte SOCK_SYNCACHE_MAXTIMEOUT
public static final int ENOERROR
public static final int EOK
public static final int EBADF
public static final int EFAULT
public static final int EINVAL
public static final int EMFILE
public static final int EWOULDBLOCK
public static final int EALREADY
public static final int EDESTADDRREQ
public static final int EMSGSIZE
public static final int ENOTSUPP
public static final int EOPNOTSUPP
public static final int EADDRINUSE
public static final int ENETDOWN
public static final int ECONNABORTED
public static final int ECONNRESET
public static final int ENOBUFS
public static final int EISCONN
public static final int ENOTCONN
public static final int ESHUTDOWN
public static final int ETIMEDOUT
public static final int ECONNREFUSED
public static final int EHOSTUNREACH
public static final int EUNEXPECTED
public static final int EHOST_NOT_FOUND
public static final int EACC
public static final int EADDRNOTAVAIL
public static final int EAFNOSUPPORT
public static final int EHOSTDOWN
public static final int EINPROGRESS
public static final int EINTR
public static final int ENETRESET
public static final int ENETUNREACH
public static final int ENOPROTOOPT
public static final int ENOTSOCK
public static final int EPFNOSUPPORT
public static final int EPROTONOSUPPORT
public static final int EPROTOTYPE
public static final int ESOCKTNOSUPPORT
public static final int ECONNCLOSE
public static final int PDP_LCP_FAILED
public static final int PDP_PAP_AUTH_FAILED
public static final int PDP_CHAP_AUTH_FAILED
public static final int PDP_IPCP_FAILED
public static final int PDP_BADF
public static final int PDP_CANNOTOBTAINCTX
public static final int PDP_INTERNAL1
public static final int PDP_INTERNAL2
public static final int PDP_NO_AUTH_REQ
public static final int PDP_INTERNAL3
public static final int PDP_CONNECT_FAILED
public static final int PDP_INTERNAL4
public static final int PDP_NO_IP_RECEIVED
public static final int PDP_NO_NETWORK_ID
public static final int PDP_NETWORK_NOT_UP
public static final int PDP_INTERNAL5
public static final int PDP_NO_DNS_RECEIVED
public static final int DNS_ENODATA
public static final int DNS_ETIMEOUT
public static final int DNS_ECONNREFUSED
public static final int DNS_EDESTRUCTION
public static final int DNS_EINVALIDPARAM
public static final int DNS_EINVALIDSERVER
public static final int DNS_UNDEFINED
public static final int INTERNAL_NETWORK_ERROR
public static int LastNetError()
public static String Hostname(String Host) throws ConnectionNotFoundException, IOException
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersConnectionNotFoundException
IOException
SocketConnection
public static String HostbyAddr(String Hostaddr) throws IOException
Note: For the Host address string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a IP address as string in dotted notation and optional bearer control
parametersIOException
SocketConnection
public static int Ping(String Host, int Timeout, int NumPings, int Size, int Delay, int Ttl, PingResponse Response) throws ConnectionNotFoundException, IOException
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetNumPings
- number of ping packets to sendSize
- the amount of content bytes within a packetDelay
- a timeout between each packet to sendTtl
- a valid time to live value for a packetConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host, int Timeout, int NumPings, int Size, int Delay, int Ttl) throws ConnectionNotFoundException, IOException
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetNumPings
- number of ping packets to sendSize
- the amount of content bytes within a packetDelay
- a timeout between each packet to sendTtl
- a valid time to live value for a packetConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host, int Timeout, int NumPings, int Size, int Delay) throws ConnectionNotFoundException, IOException
with Ttl=128
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetNumPings
- number of ping packets to sendSize
- the amount of content bytes within a packetDelay
- a timeout between each packet to sendConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host, int Timeout, int NumPings, int Size) throws ConnectionNotFoundException, IOException
with Ttl=128, delay=1000ms
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetNumPings
- number of ping packets to sendSize
- the amount of content bytes within a packetConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host, int Timeout, int NumPings) throws ConnectionNotFoundException, IOException
with Ttl=128, delay=1000 ms, contentsize=32 bytes
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetNumPings
- number of ping packets to sendConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host, int Timeout) throws ConnectionNotFoundException, IOException
with Ttl=128, contentsize=32 bytes, 1 ping packet sent
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersTimeout
- a max timeout for every ping packetConnectionNotFoundException
IOException
SocketConnection
public static int Ping(String Host) throws ConnectionNotFoundException, IOException
with Ttl=128, contentsize=32 bytes, 1 ping packet sent, timeout=5000 ms
Note: For the hostname string, optional parameters as an alternative to at^sjnet are possible, see SocketConnection (Cinterion WM optional parameters) for further details.
Host
- A string with a hostname and optional bearer control parametersConnectionNotFoundException
IOException
SocketConnection
public static void SetTcpNR(int nr) throws IOException
nr
- number of retransmissionsIOException
public static void SetTcpOT(int ot) throws IOException
ot
- overall timeout in millisecondsIOException
public static void SetTcpSNR(int snr) throws IOException
snr
- number of retransmissions for SYNC packetsIOException
public static void SetTcpSMRT(int smrt) throws IOException
smrt
- overall timeout for SYNC retransmissions in millisecondsIOException
public static void SetTcpIRT(int irt) throws IOException
irt
- initial retransmission timeout in millisecondsIOException
public static int GetTcpNR() throws IOException
IOException
public static int GetTcpOT() throws IOException
IOException
public static int GetTcpSNR() throws IOException
IOException
public static int GetTcpSMRT() throws IOException
IOException
public static int GetTcpIRT() throws IOException
IOException
Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.