menu
- swamp
- client.dart
- SwampConnection class
SwampConnection
SwampConnection class
Constructors
-
SwampConnection({required Uri server, Uint8List? roomId, String roomCodeEncoder(Uint8List) = encodeRoomCode, Uint8List roomCodeDecoder(String) = decodeRoomCode, E2EENetworkerPipe? e2eePipe, String split = kDefaultSwampSplit, RoomFlags flags = const RoomFlags()})
-
-
SwampConnection.build(Uri address, {String split = kDefaultSwampSplit, String roomCodeEncoder(Uint8List)?, Uint8List roomCodeDecoder(String)?, RoomFlags flags = const RoomFlags()})
-
factory
Methods
-
addClientConnection(SwampClientConnectionInfo info, [Channel? id])
→ Channel
-
inherited
-
callFunction(int function, Uint8List data, {Channel sender = kAnyChannel, bool forceLocal = false})
→ bool
-
inherited
-
callNamedFunction(SwampEvent name, Uint8List data, {Channel sender = kAnyChannel, bool forceLocal = false})
→ bool
-
inherited
-
clearConnections()
→ void
-
inherited
-
close()
→ FutureOr<void>
-
inherited
-
closeConnection(Channel id)
→ void
-
inherited
-
connect(NetworkerPipe<RpcNetworkerPacket, dynamic> pipe)
→ void
-
inherited
-
decode(Uint8List data)
→ RpcNetworkerPacket
-
inherited
-
decodeChannel(Uint8List data, Channel channel)
→ FutureOr<(RpcNetworkerPacket, Channel)?>
-
inherited
-
disconnect(NetworkerPipe<RpcNetworkerPacket, dynamic> pipe)
→ void
-
inherited
-
encode(RpcNetworkerPacket data)
→ Uint8List
-
inherited
-
encodeChannel(RpcNetworkerPacket data, Channel channel)
→ FutureOr<(Uint8List, Channel)?>
-
inherited
-
getConnectionInfo(Channel channel)
→ SwampClientConnectionInfo?
-
inherited
-
getFunction(int function)
→ RawNetworkerPipe?
-
inherited
-
getNamedFunction(SwampEvent name)
→ RawNetworkerPipe?
-
inherited
-
getSecureAddress()
→ Future<Uri>
-
-
init()
→ Future<void>
-
override
-
isValidCall(int function, Channel sender, [Channel receiver = kAnyChannel])
→ bool
-
inherited
-
isValidNamedCall(SwampEvent name, Channel sender, [Channel receiver = kAnyChannel])
→ bool
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onMessage(Uint8List data, [Channel channel = kAnyChannel])
→ Future<void>
-
inherited
-
registerFunction(int function, {bool canRunLocally = false, RpcNetworkerMode mode = RpcNetworkerMode.authority})
→ RawNetworkerPipe
-
inherited
-
registerNamedFunction(SwampEvent name)
→ RawNetworkerPipe
-
inherited
-
registerNamedFunctions(List<SwampEvent> functions)
→ List<RawNetworkerPipe>
-
inherited
-
removeConnection(Channel id)
→ bool
-
inherited
-
runFunction(RpcNetworkerPacket packet, {bool forceLocal = false, Channel? channel})
→ bool
-
inherited
-
runNamedFunction(RpcNetworkerPacket packet, {bool forceLocal = false, Channel? channel})
→ bool
-
inherited
-
sendFunction(int function, Uint8List data, {Channel channel = kAnyChannel, Channel? receiver, bool forceLocal = false})
→ void
-
inherited
-
sendMessage(RpcNetworkerPacket data, [Channel channel = kAnyChannel])
→ Future<void>
-
inherited
-
sendNamedFunction(SwampCommand name, Uint8List data, {Channel channel = kAnyChannel, bool forceLocal = false, Channel? receiver})
→ void
-
inherited
-
sendPacket(Uint8List data, Channel channel)
→ void
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
unregisterFunction(int function)
→ bool
-
inherited
-
unregisterNamedFunction(SwampEvent name)
→ bool
-
inherited