다음을 통해 공유


ServerSocket.SetOption(ISocketOption, Object) Method

Definition

Sets the value of a socket option.

[Android.Runtime.Register("setOption", "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/net/ServerSocket;", "GetSetOption_Ljava_net_SocketOption_Ljava_lang_Object_Handler", ApiSince=33)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public virtual Java.Net.ServerSocket? SetOption (Java.Net.ISocketOption? name, Java.Lang.Object? value);
[<Android.Runtime.Register("setOption", "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/net/ServerSocket;", "GetSetOption_Ljava_net_SocketOption_Ljava_lang_Object_Handler", ApiSince=33)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member SetOption : Java.Net.ISocketOption * Java.Lang.Object -> Java.Net.ServerSocket
override this.SetOption : Java.Net.ISocketOption * Java.Lang.Object -> Java.Net.ServerSocket

Parameters

name
ISocketOption

The socket option

value
Object

The value of the socket option. A value of null may be valid for some options.

Returns

this ServerSocket

Attributes

Remarks

Sets the value of a socket option.

Added in 9.

Java documentation for java.net.ServerSocket.setOption(java.net.SocketOption<T>, T).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to