https://github.com/hellokitty/gladnet.asp.client
GladNet2 client API implemented for ASP-backed servers over HTTP.
https://github.com/hellokitty/gladnet.asp.client
Last synced: over 1 year ago
JSON representation
GladNet2 client API implemented for ASP-backed servers over HTTP.
- Host: GitHub
- URL: https://github.com/hellokitty/gladnet.asp.client
- Owner: HelloKitty
- License: bsd-3-clause
- Created: 2016-06-23T06:12:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-06T15:16:56.000Z (about 9 years ago)
- Last Synced: 2025-01-24T06:11:19.138Z (over 1 year ago)
- Language: C#
- Size: 167 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GladNet.ASP.Client
GladNet2 is a message based networking API library for for Unity3D/.Net developers. Defines an API from which other lowerlevel network libraries can be adapted to.
Come chat: [](https://gitter.im/HelloKitty/GladNet2.0?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
GladNet.ASP.Client is GladNet2 client API implemented for ASP-backed servers over HTTP.
## Implementations
Lidgren's: https://github.com/HelloKitty/GladNet2-Lidgren
Photon Server's: https://github.com/HelloKitty/GladNet.PhotonServer
ASP.Client (Client Only): https://github.com/HelloKitty/GladNet.ASP.Client
## Setup
To use this project you'll first need a couple of things:
- Visual Studio 2015
- Add Nuget Feed https://www.myget.org/F/hellokitty/api/v2 in VS (Options -> NuGet -> Package Sources)
## Builds
[TBA]
# How does this Work?
GladNet.ASP.Client isn't really specifically targeting ASP web services. GladNet.ASP.Client communicates with web services/servers through HTTP by sending requests, and receiving responses, from these services/servers.
You may wonder why ASP is explicitly included in the title of this library. This is because of how GladNet.ASP.Client handles GladNet API requests over HTTP. Simply stated, the HTTP requests can easily fit the routing scheme for ASP Web API/Controllers. The end-point URL for requests in all current GladNet.ASP.Client implementations fits the simple scheme detailed in the below section.
##### Request Scheme
```
HTTP POST to {BaseUrl}/api/{GladNet.Common.PacketPayload Name}
```
Anyone familiar to ASP will recognize that this is a simple routing scheme for Web API controllers. (Fun Fact: Sharing a payload library between client and server allows you compile-time checked routing using nameof in C# 6)
##### What does this mean for non-ASP web services/servers?
It means only that your HTTP POST handling for these requests should fit the ASP routing scheme laid out above. So long as you respond using the [GladNet Payload API](https://github.com/HelloKitty/GladNet2/tree/master/src/GladNet.Payload) using the same [serialization](https://github.com/HelloKitty/GladNet2/tree/master/src/GladNet.Serializer) scheme this client may communicate with your webserver.
##### Why is there no corresponding server library?
There used to be no server library. However, with the new GladNet 2.x routing changes and changes to the message API it is now required to implement the very light server library.
If you do not implemented the library you must know that the client expects servers to accept and deserialization incoming NetworkMessages in the request bodies of the POST requests.
##Tests
#### Linux/Mono - Unit Tests
||Debug x86|Debug x64|Release x86|Release x64|
|:--:|:--:|:--:|:--:|:--:|:--:|
|**master**| N/A | N/A | N/A | [](https://travis-ci.org/HelloKitty/GladNet.ASP.Client) |
|**dev**| N/A | N/A | N/A | [](https://travis-ci.org/HelloKitty/GladNet.ASP.Client)|
#### Windows - Unit Tests
(Done locally)
##Licensing
This project is licensed under the MIT license.