GoPlay originated from the demand for online game development. It is a simple, easy-to-use, low learning curve, and out-of-the-box RPC framework based on C#, but not limited to game usage. It can be used to solve any real-time network communication problems.
[Processor("echo")]
class EchoProcessor : ProcessorBase
{
[Request("echo")]
public PbString Echo(Header header, PbString str)
{
return new PbString
{
Value = $"Server reply: {str.Value}"
};
}
//Echo_Echo is a function generated automatically by code.
var (status, resp) = await client.Echo_Echo(new PbString{
Value = "Hello"
});
Assert.AreEqual(StatusCode.Success, status.Code);
Assert.AreEqual("Serv reply: Hello", resp.Value);
- Client sends a request to the server and expects a response from the server.
- Client sends a request to the server without requiring a response from the server.
- The server actively pushes data to the client.
Thanks to JetBrains for providing an open source license for GoPlay.Net.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.