public class WebSocket extends NetObject implements java.lang.AutoCloseable
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Net.WebSockets.WebSocket
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Net.WebSockets, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
static java.lang.String |
assemblyShortName
Assembly name: System.Net.WebSockets
|
static java.lang.String |
className
Qualified class name: System.Net.WebSockets.WebSocket
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
WebSocket() |
WebSocket(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Abort()
Invokes the .NET member Abort.
|
static WebSocket |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into WebSocket, a cast assert is made to check if types are compatible. |
void |
close() |
Task |
CloseAsync(WebSocketCloseStatus closeStatus,
java.lang.String statusDescription,
CancellationToken cancellationToken)
Invokes the .NET member CloseAsync.
|
Task |
CloseOutputAsync(WebSocketCloseStatus closeStatus,
java.lang.String statusDescription,
CancellationToken cancellationToken)
Invokes the .NET member CloseOutputAsync.
|
static ArraySegment_1 |
CreateClientBuffer(int receiveBufferSize,
int sendBufferSize)
Invokes the .NET member CreateClientBuffer.
|
static WebSocket |
CreateClientWebSocket(Stream innerStream,
java.lang.String subProtocol,
int receiveBufferSize,
int sendBufferSize,
TimeSpan keepAliveInterval,
boolean useZeroMaskingKey,
ArraySegment_1 internalBuffer)
Invokes the .NET member CreateClientWebSocket.
|
static WebSocket |
CreateFromStream(Stream stream,
boolean isServer,
java.lang.String subProtocol,
TimeSpan keepAliveInterval)
Invokes the .NET member CreateFromStream.
|
static WebSocket |
CreateFromStream(Stream stream,
WebSocketCreationOptions options)
Invokes the .NET member CreateFromStream.
|
static ArraySegment_1 |
CreateServerBuffer(int receiveBufferSize)
Invokes the .NET member CreateServerBuffer.
|
void |
Dispose()
Invokes the .NET member Dispose.
|
Nullable_1 |
getCloseStatus()
Gets the value of the .NET property CloseStatus.
|
java.lang.String |
getCloseStatusDescription()
Gets the value of the .NET property CloseStatusDescription.
|
static TimeSpan |
getDefaultKeepAliveInterval()
Gets the value of the .NET property DefaultKeepAliveInterval.
|
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
WebSocketState |
getState()
Gets the value of the .NET property State.
|
java.lang.String |
getSubProtocol()
Gets the value of the .NET property SubProtocol.
|
static boolean |
IsApplicationTargeting45()
Invokes the .NET member IsApplicationTargeting45.
|
Task_1 |
ReceiveAsync(ArraySegment_1 buffer,
CancellationToken cancellationToken)
Invokes the .NET member ReceiveAsync.
|
ValueTask_1 |
ReceiveAsync(Memory_1 buffer,
CancellationToken cancellationToken)
Invokes the .NET member ReceiveAsync.
|
static void |
RegisterPrefixes()
Invokes the .NET member RegisterPrefixes.
|
Task |
SendAsync(ArraySegment_1 buffer,
WebSocketMessageType messageType,
boolean endOfMessage,
CancellationToken cancellationToken)
Invokes the .NET member SendAsync.
|
ValueTask |
SendAsync(ReadOnlyMemory_1 buffer,
WebSocketMessageType messageType,
boolean endOfMessage,
CancellationToken cancellationToken)
Invokes the .NET member SendAsync.
|
ValueTask |
SendAsync(ReadOnlyMemory_1 buffer,
WebSocketMessageType messageType,
WebSocketMessageFlags messageFlags,
CancellationToken cancellationToken)
Invokes the .NET member SendAsync.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public WebSocket()
throws java.lang.Throwable
java.lang.Throwablepublic WebSocket(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic void Abort()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic static WebSocket cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into WebSocket, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedWebSocket instancejava.lang.Throwable - in case of error during cast operationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic Task CloseAsync(WebSocketCloseStatus closeStatus, java.lang.String statusDescription, CancellationToken cancellationToken) throws java.lang.Throwable
closeStatus - the argument of type WebSocketCloseStatusstatusDescription - the argument of type java.lang.StringcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic Task CloseOutputAsync(WebSocketCloseStatus closeStatus, java.lang.String statusDescription, CancellationToken cancellationToken) throws java.lang.Throwable
closeStatus - the argument of type WebSocketCloseStatusstatusDescription - the argument of type java.lang.StringcancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic static ArraySegment_1 CreateClientBuffer(int receiveBufferSize, int sendBufferSize) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
receiveBufferSize - the argument of type intsendBufferSize - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic static WebSocket CreateClientWebSocket(Stream innerStream, java.lang.String subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, boolean useZeroMaskingKey, ArraySegment_1 internalBuffer) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, UnreachableException, OverflowException, FormatException, OutOfMemoryException, EventSourceException
innerStream - the argument of type StreamsubProtocol - the argument of type java.lang.StringreceiveBufferSize - the argument of type intsendBufferSize - the argument of type intkeepAliveInterval - the argument of type TimeSpanuseZeroMaskingKey - the argument of type booleaninternalBuffer - the argument of type ArraySegment_1java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itUnreachableException - if the .NET member raises itOverflowException - if the .NET member raises itFormatException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itEventSourceException - if the .NET member raises itpublic static WebSocket CreateFromStream(Stream stream, boolean isServer, java.lang.String subProtocol, TimeSpan keepAliveInterval) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, UnreachableException, OverflowException, FormatException, OutOfMemoryException, EventSourceException
stream - the argument of type StreamisServer - the argument of type booleansubProtocol - the argument of type java.lang.StringkeepAliveInterval - the argument of type TimeSpanjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itUnreachableException - if the .NET member raises itOverflowException - if the .NET member raises itFormatException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itEventSourceException - if the .NET member raises itpublic static WebSocket CreateFromStream(Stream stream, WebSocketCreationOptions options) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, OutOfMemoryException, EventSourceException, FormatException, SynchronizationLockException
stream - the argument of type Streamoptions - the argument of type WebSocketCreationOptionsjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itEventSourceException - if the .NET member raises itFormatException - if the .NET member raises itSynchronizationLockException - if the .NET member raises itpublic static ArraySegment_1 CreateServerBuffer(int receiveBufferSize) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
receiveBufferSize - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic void Dispose()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic Nullable_1 getCloseStatus() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getCloseStatusDescription()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic static TimeSpan getDefaultKeepAliveInterval() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectpublic WebSocketState getState() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getSubProtocol()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic static boolean IsApplicationTargeting45()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic Task_1 ReceiveAsync(ArraySegment_1 buffer, CancellationToken cancellationToken) throws java.lang.Throwable
buffer - the argument of type ArraySegment_1cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic ValueTask_1 ReceiveAsync(Memory_1 buffer, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException
buffer - the argument of type Memory_1cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic static void RegisterPrefixes()
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
CultureNotFoundException,
ObjectDisposedException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic Task SendAsync(ArraySegment_1 buffer, WebSocketMessageType messageType, boolean endOfMessage, CancellationToken cancellationToken) throws java.lang.Throwable
buffer - the argument of type ArraySegment_1messageType - the argument of type WebSocketMessageTypeendOfMessage - the argument of type booleancancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic ValueTask SendAsync(ReadOnlyMemory_1 buffer, WebSocketMessageType messageType, boolean endOfMessage, CancellationToken cancellationToken) throws java.lang.Throwable, PlatformNotSupportedException, ArgumentNullException
buffer - the argument of type ReadOnlyMemory_1messageType - the argument of type WebSocketMessageTypeendOfMessage - the argument of type booleancancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRPlatformNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic ValueTask SendAsync(ReadOnlyMemory_1 buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException
buffer - the argument of type ReadOnlyMemory_1messageType - the argument of type WebSocketMessageTypemessageFlags - the argument of type WebSocketMessageFlagscancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class NetObjectinstance - the new underlying object