Interface IClientNetworkChannel
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Represent a custom network channel for sending messages between client and server
public interface IClientNetworkChannel : INetworkChannel
- Inherited Members
- Extension Methods
Properties
Connected
True if the server is listening on this channel
bool Connected { get; }
Property Value
Methods
RegisterMessageType(Type)
Registers a handler for when you send a packet with given messageId. Must be registered in the same order as on the server.
IClientNetworkChannel RegisterMessageType(Type type)
Parameters
type
Type
Returns
RegisterMessageType<T>()
Registers a handler for when you send a packet with given messageId. Must be registered in the same order as on the server.
IClientNetworkChannel RegisterMessageType<T>()
Returns
Type Parameters
T
SendPacket<T>(T)
Sends a packet to the server
void SendPacket<T>(T message)
Parameters
message
T
Type Parameters
T
SetMessageHandler<T>(NetworkServerMessageHandler<T>)
Registers a handler for when you send a packet with given messageId
IClientNetworkChannel SetMessageHandler<T>(NetworkServerMessageHandler<T> handler)
Parameters
handler
NetworkServerMessageHandler<T>
Returns
Type Parameters
T