-
Notifications
You must be signed in to change notification settings - Fork 18
PhotonWire.Server
public class PhotonWire.Server.CustomErrorException
: Exception, ISerializable, _Exception
Properties
Type | Name | Summary |
---|---|---|
String |
ErrorMessage | Return message to client. |
Object |
Parameter | Return parameter, only photon supported type. |
Int16 |
ReturnCode | Receiving returnCode. Code must not be 0 or -1. |
public static class PhotonWire.Server.DictionaryItemsExtensions
Static Methods
Type | Name | Summary |
---|---|---|
T |
GetValueOrDefault(this IDictionary<Object, Object> items, Object key, T defaultValue = null) |
Hub is operation proxy of ClientPeer.
public abstract class PhotonWire.Server.Hub
: Hub<INoClient>, IHub, IPhotonWireHub
Hub is operation proxy of ClientPeer.
public abstract class PhotonWire.Server.Hub<T>
: IHub, IPhotonWireHub
Properties
Type | Name | Summary |
---|---|---|
HubCallerClientProxy<T> |
Clients | Client Proxy of peers. |
OperationContext |
Context |
Methods
Type | Name | Summary |
---|---|---|
ServerHubClientProxy<TServerHub> |
GetServerHubProxy() |
public class PhotonWire.Server.HubAttribute
: Attribute, _Attribute
Properties
Type | Name | Summary |
---|---|---|
Int16 |
HubId |
public class PhotonWire.Server.HubCallerClientProxy<T>
: HubClientProxy<T>
Properties
Type | Name | Summary |
---|---|---|
T |
Caller | Broadcast to caller client. |
T |
Others | Broadcast to all(in current gameserver) except caller client. |
public class PhotonWire.Server.HubClientProxy<T>
Fields
Type | Name | Summary |
---|---|---|
HubContext |
context |
Properties
Type | Name | Summary |
---|---|---|
T |
All | Broadcast to all(in current gameserver) client. |
Methods
Type | Name | Summary |
---|---|---|
T |
AllExcept(IPhotonWirePeer[] excludePeers) |
Broadcast to all(in current gameserver) except exclude peers. |
T |
Group(String groupName, IPhotonWirePeer[] excludePeers) |
Broadcast to target group(in current gameserver) except exclude peers. |
T |
Groups(IList<String> groupNames, IPhotonWirePeer[] excludePeers) |
Broadcast to target groups(in current gameserver) except exclude peers. |
T |
OthersInGroup(String groupName) |
Broadcast to all(in current gameserver) except exclude group. |
T |
OthersInGroups(IEnumerable<String> groupNames) |
Broadcast to all(in current gameserver) except exclude groups. |
T |
Target(IPhotonWirePeer peer) |
Broadcast to target(in current gameserver) client. |
T |
Targets(IEnumerable<IPhotonWirePeer> peers) |
Broadcast to target(in current gameserver) clients. |
public class PhotonWire.Server.HubContext
Properties
Type | Name | Summary |
---|---|---|
HubDescriptor |
Hub | |
SendParameters |
SendParameters |
Methods
Type | Name | Summary |
---|---|---|
void |
BroadcastEvent(IEnumerable<IPhotonWirePeer> targetPeers, Byte eventCode, Object[] args) |
|
HubClientProxy<T> |
GetClientProxy() |
public class PhotonWire.Server.HubContext<TClient>
: HubContext
Properties
Type | Name | Summary |
---|---|---|
HubClientProxy<TClient> |
Clients |
public class PhotonWire.Server.HubDescriptor
Properties
Type | Name | Summary |
---|---|---|
Boolean |
CanExecute | |
Type |
ClientType | |
Int16 |
HubId | |
HubKind |
HubKind | |
String |
HubName | |
ReadOnlyHashSet<String> |
HubTags | |
Type |
HubType |
Methods
Type | Name | Summary |
---|---|---|
String[] |
GetRegisteredMethods() | |
Boolean |
TryGetMethod(Byte operationCode, MethodDescriptor& methodDescriptor) |
Static Methods
Type | Name | Summary |
---|---|---|
HubDescriptor |
CreateIfPossible(Type type) |
public class PhotonWire.Server.HubTag
: Attribute, _Attribute
Properties
Type | Name | Summary |
---|---|---|
IReadOnlyCollection<String> |
Tags |
public class PhotonWire.Server.IgnoreClientGenerateAttribute
: Attribute, _Attribute
Indicated cless or method don't register and don't generate in PhotonWire engine.
public class PhotonWire.Server.IgnoreOperationAttribute
: Attribute, _Attribute
public interface PhotonWire.Server.IHub
: IPhotonWireHub
Marker of No Client.
public interface PhotonWire.Server.INoClient
public interface PhotonWire.Server.IPhotonSerializer
Methods
Type | Name | Summary |
---|---|---|
Object |
Deserialize(Type type, Object value) |
|
Object |
Serialize(Object obj) |
Common interface for ClientHub(Hub), ServerHub, ReceiveServerHub
public interface PhotonWire.Server.IPhotonWireHub
Properties
Type | Name | Summary |
---|---|---|
OperationContext |
Context | Context per operation. |
public interface PhotonWire.Server.IPhotonWirePeer
Properties
Type | Name | Summary |
---|---|---|
Int32 |
ConnectionId | |
ConcurrentDictionary<Object, Object> |
Items | Property storage per connection. |
PeerBase |
PeerBase | |
PeerKind |
PeerKind |
Methods
Type | Name | Summary |
---|---|---|
IDisposable |
RegisterDisconnectAction(Action<Int32, String> disconnectAction) |
Action = DisconnectReason reasonCode, string reasonDetail |
SendResult |
SendOperationResponse(OperationResponse operationResponse, SendParameters sendParameters) |
public interface PhotonWire.Server.IS2SPhotonWirePeer
: IPhotonWirePeer
Methods
Type | Name | Summary |
---|---|---|
Task<OperationResponse> |
SendOperationRequestAsync(Byte operationCode, Dictionary<Byte, Object> parameters, SendParameters sendParameters) |
public class PhotonWire.Server.MethodDescriptor
Properties
Type | Name | Summary |
---|---|---|
ParameterInfoSlim[] |
Arguments | |
ILookup<Type, Attribute> |
AttributeLookup | |
HubDescriptor |
Hub | |
String |
MethodName | |
Byte |
OperationCode | |
IReadOnlyList<String> |
ParameterNames | |
Type |
ReturnType |
Methods
Type | Name | Summary |
---|---|---|
Task<Object> |
Execute(OperationContext context) |
public class PhotonWire.Server.OperationAttribute
: Attribute, _Attribute
Properties
Type | Name | Summary |
---|---|---|
Byte |
OperationCode |
Encapsulates all information about an individual Photon request.
public class PhotonWire.Server.OperationContext
Properties
Type | Name | Summary |
---|---|---|
HubDescriptor |
Hub | Info of belongs to Hub. |
IDictionary<Object, Object> |
Items | Property storage per operation. |
MethodDescriptor |
Method | Info of belongs to Method. |
OperationRequest |
OperationRequest | PhotonPeer's raw argument of OperationRequest. |
IReadOnlyList<Object> |
Parameters | Parameter values of method. |
IPhotonWirePeer |
Peer | Peer of caller. |
SendParameters |
SendParameters | PhotonPeer's raw argument of SendParameters. |
DateTime |
Timestamp | Initial timestamp of the current Photon request. |
Methods
Type | Name | Summary |
---|---|---|
void |
SendOperation(Int32 messageId, Object result, String debugMessage, Boolean isError, IPhotonSerializer serializer, Nullable<Int16> returnCode) |
public class PhotonWire.Server.ParameterInfoSlim
Properties
Type | Name | Summary |
---|---|---|
Object |
DefaultValue | |
Boolean |
IsOptional | |
String |
Name | |
Type |
ParameterType | |
Boolean |
ParameterTypeIsArray | |
Boolean |
ParameterTypeIsClass | |
Boolean |
ParameterTypeIsNullable |
public enum PhotonWire.Server.PeerKind
: Enum, IComparable, IFormattable, IConvertible
Enum
Value | Name | Summary |
---|---|---|
0 |
Inbound | |
1 |
Outbound | |
2 |
Client |
Managing Peer and Peer Groups.
public class PhotonWire.Server.PeerManager
Methods
Type | Name | Summary |
---|---|---|
void |
Add(IPhotonWirePeer peer) |
|
void |
AddGroup(String groupName, IPhotonWirePeer peer) |
|
ImmutableHashSet<IPhotonWirePeer> |
GetAll() | |
IPhotonWirePeer |
GetByConnectionId(Int32 connectionId) |
|
ImmutableHashSet<IPhotonWirePeer> |
GetExceptOne(IPhotonWirePeer peer) |
|
ImmutableHashSet<IPhotonWirePeer> |
GetExceptPeers(IEnumerable<IPhotonWirePeer> peers) |
|
ImmutableHashSet<IPhotonWirePeer> |
GetGroup(String groupName) |
|
void |
Remove(IPhotonWirePeer peer) |
|
void |
RemoveGroup(String groupName, IPhotonWirePeer peer) |
|
void |
RemoveGroupAll(String groupName) |
Static Properties
Type | Name | Summary |
---|---|---|
PeerManager |
ClientConnections | |
PeerManager |
InboundServerConnections | |
PeerManager |
OutboundServerConnections |
Static Methods
Type | Name | Summary |
---|---|---|
HubClientProxy<TClient> |
GetHubClient() | |
HubClientProxy<TClient> |
GetHubClient(SendParameters sendParameters) |
|
HubContext |
GetHubContext() | |
HubContext |
GetHubContext(SendParameters sendParameters) |
|
HubContext<TClient> |
GetHubContext() | |
HubContext<TClient> |
GetHubContext(SendParameters sendParameters) |
|
PeerManager |
GetPeerManager(PeerKind peerKind) |
|
ServerHubContext<THub> |
GetReceiveServerHubContext() | |
ServerHubContext<THub> |
GetReceiveServerHubContext(SendParameters sendParameters) |
|
ServerHubContext<THub> |
GetServerHubContext() | |
ServerHubContext<THub> |
GetServerHubContext(SendParameters sendParameters) |
public abstract class PhotonWire.Server.PhotonSerializerBase
: IPhotonSerializer
Methods
Type | Name | Summary |
---|---|---|
Object |
Deserialize(Type type, Object value) |
|
Object |
DeserializeCore(Type type, Byte[] value) |
|
Object |
Serialize(Object obj) |
|
Byte[] |
SerializeCore(Object obj) |
public static class PhotonWire.Server.PhotonSerializers
Static Properties
Type | Name | Summary |
---|---|---|
IPhotonSerializer |
Json | |
IPhotonSerializer |
MsgPack |
Application Startup for PhotonWire.
public abstract class PhotonWire.Server.PhotonWireApplicationBase
: ApplicationBase, IPhotonApplication, IPhotonControl
Properties
Type | Name | Summary |
---|---|---|
Nullable<TimeSpan> |
DisconnectAllPeersAfterOnRequestStopped | If use graceful-restart(EnableShadowCopy/EnableAutoRestart), AppDomain keep alived. This timestpan force disconnect for start to TearDown. |
Assembly[] |
HubTargetAssemlies | |
String[] |
HubTargetTags | |
Boolean |
IsDebugMode | If true, 1. return exception message return to client when operation failed. 2. broadcast JSON(dumpable) message when from PhotonWire.HubInvoker. 3. show Debug.Fail dialog if failed on initialization |
IPhotonWireLogger |
Logger | |
IPhotonSerializer |
Serializer |
Methods
Type | Name | Summary |
---|---|---|
Task<PhotonWireOutboundS2SPeer> |
ConnectToOutboundServerAsync(IPEndPoint ipEndPoint, String applicationName, String groupName = null, Object customInitObject = null, Boolean useMux = False, Nullable<Int64> reconnectIntervalMs = 1000, Action<PhotonWireOutboundS2SPeer> onReconnected = null) |
|
PeerBase |
CreatePeer(InitRequest initRequest) |
|
Boolean |
IsServerToServerPeer(InitRequest initRequest) |
|
void |
OnPeerCreated(IPhotonWirePeer peer, InitRequest initRequest, Boolean isServerToServerPeer) |
|
void |
OnStopRequested() | |
void |
OnStopRequestedCore() | |
void |
Setup() | |
void |
SetupCore() | |
void |
TearDown() | |
void |
TearDownCore() |
Static Properties
Type | Name | Summary |
---|---|---|
PhotonWireApplicationBase |
Instance |
Static Methods
Type | Name | Summary |
---|---|---|
Task<PhotonWireOutboundS2SPeer> |
ConnectToOutboundServerAsync(PhotonWireApplicationBase applicationBase, IPEndPoint ipEndPoint, String applicationName, String groupName = null, Object customInitObject = null, Boolean useMux = False, Nullable<Int64> reconnectIntervalMs = 1000, Action<PhotonWireOutboundS2SPeer> onReconnected = null) |
public class PhotonWire.Server.PhotonWireClientPeer
: ClientPeer, IDisposable, IManagedPeer, IPhotonWirePeer
Properties
Type | Name | Summary |
---|---|---|
ConcurrentDictionary<Object, Object> |
Items | Property storage per connection. |
PeerBase |
PeerBase | |
PeerKind |
PeerKind |
Methods
Type | Name | Summary |
---|---|---|
void |
OnDisconnect(DisconnectReason reasonCode, String reasonDetail) |
|
void |
OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters) |
|
IDisposable |
RegisterDisconnectAction(Action<Int32, String> action) |
public abstract class PhotonWire.Server.PhotonWireFilterAttribute
: Attribute, _Attribute
Properties
Type | Name | Summary |
---|---|---|
Int32 |
Order |
Methods
Type | Name | Summary |
---|---|---|
Task<Object> |
Invoke(OperationContext context, Func<Task<Object>> next) |
public static class PhotonWire.Server.PhotonWirePeerExtensions
Static Methods
Type | Name | Summary |
---|---|---|
void |
AddGroup(this IPhotonWirePeer peer, String groupName) |
|
void |
RemoveGroup(this IPhotonWirePeer peer, String groupName) |
public static class PhotonWire.Server.ReservedParameterNo
Static Fields
Type | Name | Summary |
---|---|---|
Byte |
MessageId | Key for Int MessageId |
Byte |
RequestHubId | Key for short Request HubId |
Byte |
ResponseId | Key for Byte[] Response Result |
public class PhotonWire.Server.TypedClientBuilder<T>
Static Methods
Type | Name | Summary |
---|---|---|
T |
Build(HubContext context, IEnumerable<IPhotonWirePeer> targetPeers) |
Reference document is generated by neuecc/MarkdownGenerator