Java Doc for Socket.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » jni » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.jni 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tomcat.jni.Socket

Socket
public class Socket (Code)
Socket
author:
   Mladen Turk
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $


Field Summary
final public static  intAPR_INCOMPLETE_READ
     Set on non-blocking sockets (timeout != 0) on which the previous read() did not fill a buffer completely.
final public static  intAPR_INCOMPLETE_WRITE
    
final public static  intAPR_INET
    
final public static  intAPR_INET6
    
final public static  intAPR_IPV4_ADDR_OK
    
final public static  intAPR_IPV6_ADDR_OK
    
final public static  intAPR_IPV6_V6ONLY
     Don't accept IPv4 connections on an IPv6 listening socket.
final public static  intAPR_LOCAL
    
final public static  intAPR_PROTO_SCTP
    
final public static  intAPR_PROTO_TCP
    
final public static  intAPR_PROTO_UDP
    
final public static  intAPR_REMOTE
    
final public static  intAPR_RESET_NODELAY
    
final public static  intAPR_SHUTDOWN_READ
     Define what type of socket shutdown should occur.
final public static  intAPR_SHUTDOWN_READWRITE
    
final public static  intAPR_SHUTDOWN_WRITE
    
final public static  intAPR_SO_DEBUG
    
final public static  intAPR_SO_DISCONNECTED
    
final public static  intAPR_SO_KEEPALIVE
    
final public static  intAPR_SO_LINGER
    
final public static  intAPR_SO_NONBLOCK
    
final public static  intAPR_SO_RCVBUF
    
final public static  intAPR_SO_REUSEADDR
    
final public static  intAPR_SO_SNDBUF
    
final public static  intAPR_TCP_DEFER_ACCEPT
     Delay accepting of new connections until data is available.
final public static  intAPR_TCP_NODELAY
     For SCTP sockets, this is mapped to STCP_NODELAY internally.
final public static  intAPR_TCP_NOPUSH
    
final public static  intAPR_UNSPEC
    
final public static  intSOCKET_GET_APRS
    
final public static  intSOCKET_GET_IMPL
    
final public static  intSOCKET_GET_POOL
    
final public static  intSOCKET_GET_TYPE
    
final public static  intSOCK_DGRAM
    
final public static  intSOCK_STREAM
    


Method Summary
native public static  longaccept(long sock)
     Accept a new connection request
Parameters:
  sock - The socket we are listening on.
Parameters:
  pool - The pool for the new socket.
native public static  intacceptfilter(long sock, String name, String args)
     Set an OS level accept filter.
Parameters:
  sock - The socket to put the accept filter on.
Parameters:
  name - The accept filter
Parameters:
  args - Any extra args to the accept filter.
native public static  booleanatmark(long sock)
    
native public static  intbind(long sock, long sa)
    
native public static  intclose(long thesocket)
     Close a socket.
native public static  intconnect(long sock, long sa)
     Issue a connection request to a socket either on the same machine or a different one.
native public static  longcreate(int family, int type, int protocol, long cont)
     Create a socket.
native public static  voiddestroy(long thesocket)
    
native public static  intlisten(long sock, int backlog)
     Listen to a bound socket for connections.
Parameters:
  sock - The socket to listen on
Parameters:
  backlog - The number of outstanding connections allowed in the socketslisten queue.
native public static  intoptGet(long sock, int opt)
     Query socket options for the specified socket
Parameters:
  sock - The socket to query
Parameters:
  opt - The option we would like to query.
native public static  intoptSet(long sock, int opt, int on)
     Setup socket options for the specified socket
Parameters:
  sock - The socket to set up.
Parameters:
  opt - The option we would like to configure.
native public static  longpool(long thesocket)
     Create a child pool from associated socket pool.
native public static  intrecv(long sock, byte[] buf, int offset, int nbytes)
     Read data from a network.
 This functions acts like a blocking read by default.
native public static  intrecvFrom(long from, long sock, int flags, byte[] buf, int offset, int nbytes)
    
Parameters:
  from - The apr_sockaddr_t to fill in the recipient info
Parameters:
  sock - The socket to use
Parameters:
  flags - The flags to use
Parameters:
  buf - The buffer to use
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array.
native public static  intrecvb(long sock, ByteBuffer buf, int offset, int nbytes)
     Read data from a network.
 This functions acts like a blocking read by default.
native public static  intrecvbb(long sock, int offset, int nbytes)
    
native public static  intrecvbbt(long sock, int offset, int nbytes, long timeout)
    
native public static  intrecvbt(long sock, ByteBuffer buf, int offset, int nbytes, long timeout)
     Read data from a network with timeout.
 This functions acts like a blocking read by default.
native public static  intrecvt(long sock, byte[] buf, int offset, int nbytes, long timeout)
     Read data from a network with timeout.
 This functions acts like a blocking read by default.
native public static  intsend(long sock, byte[] buf, int offset, int len)
     Send data over a network.
 This functions acts like a blocking write by default.
native public static  intsendb(long sock, ByteBuffer buf, int offset, int len)
     Send data over a network.
 This functions acts like a blocking write by default.
native public static  intsendbb(long sock, int offset, int len)
    
native public static  longsendfile(long sock, long file, byte[][] headers, byte[][] trailers, long offset, long len, int flags)
     Send a file from an open file descriptor to a socket, along with optional headers and trailers.
This functions acts like a blocking write by default.
native public static  longsendfilen(long sock, long file, long offset, long len, int flags)
     Send a file without header and trailer arrays.
native public static  intsendto(long sock, long where, int flags, byte[] buf, int offset, int len)
    
native public static  intsendv(long sock, byte[][] vec)
     Send multiple packets of data over a network.
 This functions acts like a blocking write by default.
native public static  voidsetrbb(long sock, ByteBuffer buf)
     Set internal receive ByteBuffer.
native public static  voidsetsbb(long sock, ByteBuffer buf)
     Set internal send ByteBuffer.
native public static  intshutdown(long thesocket, int how)
     Shutdown either reading, writing, or both sides of a socket.
This does not actually close the socket descriptor, it just controls which calls are still valid on the socket.
Parameters:
  thesocket - The socket to close
Parameters:
  how - How to shutdown the socket.
native public static  longtimeoutGet(long sock)
    
native public static  inttimeoutSet(long sock, long t)
    

Field Detail
APR_INCOMPLETE_READ
final public static int APR_INCOMPLETE_READ(Code)
Set on non-blocking sockets (timeout != 0) on which the previous read() did not fill a buffer completely. the next apr_socket_recv() will first call select()/poll() rather than going straight into read(). (Can also be set by an application to force a select()/poll() call before the next read, in cases where the app expects that an immediate read would fail.)



APR_INCOMPLETE_WRITE
final public static int APR_INCOMPLETE_WRITE(Code)
like APR_INCOMPLETE_READ, but for write



APR_INET
final public static int APR_INET(Code)



APR_INET6
final public static int APR_INET6(Code)



APR_IPV4_ADDR_OK
final public static int APR_IPV4_ADDR_OK(Code)
no longer allow read or write requests



APR_IPV6_ADDR_OK
final public static int APR_IPV6_ADDR_OK(Code)



APR_IPV6_V6ONLY
final public static int APR_IPV6_V6ONLY(Code)
Don't accept IPv4 connections on an IPv6 listening socket.



APR_LOCAL
final public static int APR_LOCAL(Code)
Enum to tell us if we're interested in remote or local socket apr_interface_e



APR_PROTO_SCTP
final public static int APR_PROTO_SCTP(Code)
UDP



APR_PROTO_TCP
final public static int APR_PROTO_TCP(Code)



APR_PROTO_UDP
final public static int APR_PROTO_UDP(Code)
TCP



APR_REMOTE
final public static int APR_REMOTE(Code)



APR_RESET_NODELAY
final public static int APR_RESET_NODELAY(Code)
This flag is ONLY set internally when we set APR_TCP_NOPUSH with APR_TCP_NODELAY set to tell us that APR_TCP_NODELAY should be turned on again when NOPUSH is turned off



APR_SHUTDOWN_READ
final public static int APR_SHUTDOWN_READ(Code)
Define what type of socket shutdown should occur. apr_shutdown_how_e enum



APR_SHUTDOWN_READWRITE
final public static int APR_SHUTDOWN_READWRITE(Code)
no longer allow write requests



APR_SHUTDOWN_WRITE
final public static int APR_SHUTDOWN_WRITE(Code)
no longer allow read request



APR_SO_DEBUG
final public static int APR_SO_DEBUG(Code)
Keepalive



APR_SO_DISCONNECTED
final public static int APR_SO_DISCONNECTED(Code)
Receive buffer



APR_SO_KEEPALIVE
final public static int APR_SO_KEEPALIVE(Code)
Linger



APR_SO_LINGER
final public static int APR_SO_LINGER(Code)



APR_SO_NONBLOCK
final public static int APR_SO_NONBLOCK(Code)
Debug



APR_SO_RCVBUF
final public static int APR_SO_RCVBUF(Code)
Send buffer



APR_SO_REUSEADDR
final public static int APR_SO_REUSEADDR(Code)
Non-blocking IO



APR_SO_SNDBUF
final public static int APR_SO_SNDBUF(Code)
Reuse addresses



APR_TCP_DEFER_ACCEPT
final public static int APR_TCP_DEFER_ACCEPT(Code)
Delay accepting of new connections until data is available.



APR_TCP_NODELAY
final public static int APR_TCP_NODELAY(Code)
For SCTP sockets, this is mapped to STCP_NODELAY internally.



APR_TCP_NOPUSH
final public static int APR_TCP_NOPUSH(Code)



APR_UNSPEC
final public static int APR_UNSPEC(Code)



SOCKET_GET_APRS
final public static int SOCKET_GET_APRS(Code)



SOCKET_GET_IMPL
final public static int SOCKET_GET_IMPL(Code)



SOCKET_GET_POOL
final public static int SOCKET_GET_POOL(Code)



SOCKET_GET_TYPE
final public static int SOCKET_GET_TYPE(Code)



SOCK_DGRAM
final public static int SOCK_DGRAM(Code)



SOCK_STREAM
final public static int SOCK_STREAM(Code)





Method Detail
accept
native public static long accept(long sock) throws Exception(Code)
Accept a new connection request
Parameters:
  sock - The socket we are listening on.
Parameters:
  pool - The pool for the new socket. A copy of the socket that is connected to the socket thatmade the connection request. This is the socket which shouldbe used for all future communication.



acceptfilter
native public static int acceptfilter(long sock, String name, String args)(Code)
Set an OS level accept filter.
Parameters:
  sock - The socket to put the accept filter on.
Parameters:
  name - The accept filter
Parameters:
  args - Any extra args to the accept filter. Passing NULL here removesthe accept filter.



atmark
native public static boolean atmark(long sock)(Code)
Query the specified socket if at the OOB/Urgent data mark
Parameters:
  sock - The socket to query True if socket is at the OOB/urgent mark,otherwise return false.



bind
native public static int bind(long sock, long sa)(Code)
Bind the socket to its associated port
Parameters:
  sock - The socket to bind
Parameters:
  sa - The socket address to bind toThis may be where we will find out if there is any other processusing the selected port.



close
native public static int close(long thesocket)(Code)
Close a socket.
Parameters:
  thesocket - The socket to close



connect
native public static int connect(long sock, long sa)(Code)
Issue a connection request to a socket either on the same machine or a different one.
Parameters:
  sock - The socket we wish to use for our side of the connection
Parameters:
  sa - The address of the machine we wish to connect to.



create
native public static long create(int family, int type, int protocol, long cont) throws Exception(Code)
Create a socket.
Parameters:
  family - The address family of the socket (e.g., APR_INET).
Parameters:
  type - The type of the socket (e.g., SOCK_STREAM).
Parameters:
  protocol - The protocol of the socket (e.g., APR_PROTO_TCP).
Parameters:
  cont - The parent pool to use The new socket that has been set up.



destroy
native public static void destroy(long thesocket)(Code)
Destroy a pool associated with socket
Parameters:
  thesocket - The destroy



listen
native public static int listen(long sock, int backlog)(Code)
Listen to a bound socket for connections.
Parameters:
  sock - The socket to listen on
Parameters:
  backlog - The number of outstanding connections allowed in the socketslisten queue. If this value is less than zero, the listenqueue size is set to zero.



optGet
native public static int optGet(long sock, int opt) throws Exception(Code)
Query socket options for the specified socket
Parameters:
  sock - The socket to query
Parameters:
  opt - The option we would like to query. One of:
APR_SO_DEBUG      --  turn on debugging informationAPR_SO_KEEPALIVE  --  keep connections activeAPR_SO_LINGER     --  lingers on close if data is presentAPR_SO_NONBLOCK   --  Turns blocking on/off for socketAPR_SO_REUSEADDR  --  The rules used in validating addressessupplied to bind should allow reuseof local addresses.APR_SO_SNDBUF     --  Set the SendBufferSizeAPR_SO_RCVBUF     --  Set the ReceiveBufferSizeAPR_SO_DISCONNECTED -- Query the disconnected state of the socket.(Currently only used on Windows)
Socket option returned on the call.



optSet
native public static int optSet(long sock, int opt, int on)(Code)
Setup socket options for the specified socket
Parameters:
  sock - The socket to set up.
Parameters:
  opt - The option we would like to configure. One of:
APR_SO_DEBUG      --  turn on debugging informationAPR_SO_KEEPALIVE  --  keep connections activeAPR_SO_LINGER     --  lingers on close if data is presentAPR_SO_NONBLOCK   --  Turns blocking on/off for socketWhen this option is enabled, usethe APR_STATUS_IS_EAGAIN() macro tosee if a send or receive functioncould not transfer data withoutblocking.APR_SO_REUSEADDR  --  The rules used in validating addressessupplied to bind should allow reuseof local addresses.APR_SO_SNDBUF     --  Set the SendBufferSizeAPR_SO_RCVBUF     --  Set the ReceiveBufferSize

Parameters:
  on - Value for the option.



pool
native public static long pool(long thesocket) throws Exception(Code)
Create a child pool from associated socket pool.
Parameters:
  thesocket - The socket to use



recv
native public static int recv(long sock, byte[] buf, int offset, int nbytes)(Code)
Read data from a network.
 This functions acts like a blocking read by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 The number of bytes actually received is stored in argument 3.
 It is possible for both bytes to be received and an APR_EOF or
 other error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to read the data from.
Parameters:
  buf - The buffer to store the data in.
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array. the number of bytes received.



recvFrom
native public static int recvFrom(long from, long sock, int flags, byte[] buf, int offset, int nbytes)(Code)

Parameters:
  from - The apr_sockaddr_t to fill in the recipient info
Parameters:
  sock - The socket to use
Parameters:
  flags - The flags to use
Parameters:
  buf - The buffer to use
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array. the number of bytes received.



recvb
native public static int recvb(long sock, ByteBuffer buf, int offset, int nbytes)(Code)
Read data from a network.
 This functions acts like a blocking read by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 The number of bytes actually received is stored in argument 3.
 It is possible for both bytes to be received and an APR_EOF or
 other error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to read the data from.
Parameters:
  buf - The buffer to store the data in.
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array. the number of bytes received.



recvbb
native public static int recvbb(long sock, int offset, int nbytes)(Code)
Read data from a network using internally set ByteBuffer



recvbbt
native public static int recvbbt(long sock, int offset, int nbytes, long timeout)(Code)
Read data from a network with timeout using internally set ByteBuffer



recvbt
native public static int recvbt(long sock, ByteBuffer buf, int offset, int nbytes, long timeout)(Code)
Read data from a network with timeout.
 This functions acts like a blocking read by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 The number of bytes actually received is stored in argument 3.
 It is possible for both bytes to be received and an APR_EOF or
 other error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to read the data from.
Parameters:
  buf - The buffer to store the data in.
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array.
Parameters:
  timeout - The socket timeout in microseconds. the number of bytes received.



recvt
native public static int recvt(long sock, byte[] buf, int offset, int nbytes, long timeout)(Code)
Read data from a network with timeout.
 This functions acts like a blocking read by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 The number of bytes actually received is stored in argument 3.
 It is possible for both bytes to be received and an APR_EOF or
 other error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to read the data from.
Parameters:
  buf - The buffer to store the data in.
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  nbytes - The number of bytes to read (-1) for full array.
Parameters:
  timeout - The socket timeout in microseconds. the number of bytes received.



send
native public static int send(long sock, byte[] buf, int offset, int len)(Code)
Send data over a network.
 This functions acts like a blocking write by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 It is possible for both bytes to be sent and an error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to send the data over.
Parameters:
  buf - The buffer which contains the data to be sent.
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  len - The number of bytes to write; (-1) for full array. The number of bytes send.



sendb
native public static int sendb(long sock, ByteBuffer buf, int offset, int len)(Code)
Send data over a network.
 This functions acts like a blocking write by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 It is possible for both bytes to be sent and an error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to send the data over.
Parameters:
  buf - The Byte buffer which contains the data to be sent.
Parameters:
  offset - The offset within the buffer array of the first buffer fromwhich bytes are to be retrieved; must be non-negativeand no larger than buf.length
Parameters:
  len - The maximum number of buffers to be accessed; must be non-negativeand no larger than buf.length - offset The number of bytes send.



sendbb
native public static int sendbb(long sock, int offset, int len)(Code)
Send data over a network using internally set ByteBuffer



sendfile
native public static long sendfile(long sock, long file, byte[][] headers, byte[][] trailers, long offset, long len, int flags)(Code)
Send a file from an open file descriptor to a socket, along with optional headers and trailers.
This functions acts like a blocking write by default. To change this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK socket option. The number of bytes actually sent is stored in the len parameter. The offset parameter is passed by reference for no reason; its value will never be modified by the apr_socket_sendfile() function.
Parameters:
  sock - The socket to which we're writing
Parameters:
  file - The open file from which to read
Parameters:
  headers - Array containing the headers to send
Parameters:
  trailers - Array containing the trailers to send
Parameters:
  offset - Offset into the file where we should begin writing
Parameters:
  len - Number of bytes to send from the file
Parameters:
  flags - APR flags that are mapped to OS specific flags Number of bytes actually sent, including headers,file, and trailers



sendfilen
native public static long sendfilen(long sock, long file, long offset, long len, int flags)(Code)
Send a file without header and trailer arrays.



sendto
native public static int sendto(long sock, long where, int flags, byte[] buf, int offset, int len)(Code)

Parameters:
  sock - The socket to send from
Parameters:
  where - The apr_sockaddr_t describing where to send the data
Parameters:
  flags - The flags to use
Parameters:
  buf - The data to send
Parameters:
  offset - Offset in the byte buffer.
Parameters:
  len - The length of the data to send



sendv
native public static int sendv(long sock, byte[][] vec)(Code)
Send multiple packets of data over a network.
 This functions acts like a blocking write by default.  To change
 this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
 socket option.
 The number of bytes actually sent is stored in argument 3.
 It is possible for both bytes to be sent and an error to be returned.
 APR_EINTR is never returned.
 

Parameters:
  sock - The socket to send the data over.
Parameters:
  vec - The array from which to get the data to send.



setrbb
native public static void setrbb(long sock, ByteBuffer buf)(Code)
Set internal receive ByteBuffer. This function will preset internal Java ByteBuffer for consecutive revcvbb/recvbbt calls.
Parameters:
  thesocket - The socket to use
Parameters:
  buf - The ByteBuffer



setsbb
native public static void setsbb(long sock, ByteBuffer buf)(Code)
Set internal send ByteBuffer. This function will preset internal Java ByteBuffer for consecutive sendbb calls.
Parameters:
  thesocket - The socket to use
Parameters:
  buf - The ByteBuffer



shutdown
native public static int shutdown(long thesocket, int how)(Code)
Shutdown either reading, writing, or both sides of a socket.
This does not actually close the socket descriptor, it just controls which calls are still valid on the socket.
Parameters:
  thesocket - The socket to close
Parameters:
  how - How to shutdown the socket. One of:
APR_SHUTDOWN_READ         no longer allow read requestsAPR_SHUTDOWN_WRITE        no longer allow write requestsAPR_SHUTDOWN_READWRITE    no longer allow read or write requests



timeoutGet
native public static long timeoutGet(long sock) throws Exception(Code)
Query socket timeout for the specified socket
Parameters:
  sock - The socket to query Socket timeout returned from the query.



timeoutSet
native public static int timeoutSet(long sock, long t)(Code)
Setup socket timeout for the specified socket
Parameters:
  sock - The socket to set up.
Parameters:
  t - Value for the timeout in microseconds.
t > 0  -- read and write calls return APR_TIMEUP if specified timeelapsess with no data read or writtent == 0 -- read and write calls never blockt < 0  -- read and write calls block



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.