C# 클래스 BlottoBeats.Library.Networking.BBServerConnection

Server object used to store data about the server
파일 보기 프로젝트 열기: Zwolf11/BlottoBeats 1 사용 예제들

공개 메소드들

메소드 설명
Authenticate ( Credentials credentials, bool register ) : UserToken

Sends an authentication request to the server. Returns a UserToken object if successful, or null otherwise.

BBServerConnection ( ) : System

Initializes a new connection to a BlottoBeats Server with a default ip address of localhost and a default port of 3000

BBServerConnection ( string ipAddress, int port ) : System

Initializes a new connection to a BlottoBeats Server with the given IP address and port

SendRequest ( BBRequest request ) : BBResponse

Sends a BBRequest to the server

Test ( ) : bool

Tests the server to see if the connection is valid

VerifyToken ( UserToken token ) : bool

Sends a request to the server to verify a user token is valid.

메소드 상세

Authenticate() 공개 메소드

Sends an authentication request to the server. Returns a UserToken object if successful, or null otherwise.
public Authenticate ( Credentials credentials, bool register ) : UserToken
credentials BlottoBeats.Library.Authentication.Credentials Credentials object that contains the username and password of the user.
register bool True if registering a new user, false if verifying a current one.
리턴 BlottoBeats.Library.Authentication.UserToken

BBServerConnection() 공개 메소드

Initializes a new connection to a BlottoBeats Server with a default ip address of localhost and a default port of 3000
public BBServerConnection ( ) : System
리턴 System

BBServerConnection() 공개 메소드

Initializes a new connection to a BlottoBeats Server with the given IP address and port
public BBServerConnection ( string ipAddress, int port ) : System
ipAddress string IP address of the server
port int Port to connect to the server with
리턴 System

SendRequest() 공개 메소드

Sends a BBRequest to the server
public SendRequest ( BBRequest request ) : BBResponse
request BBRequest The BBRequest to send
리턴 BBResponse

Test() 공개 메소드

Tests the server to see if the connection is valid
public Test ( ) : bool
리턴 bool

VerifyToken() 공개 메소드

Sends a request to the server to verify a user token is valid.
public VerifyToken ( UserToken token ) : bool
token BlottoBeats.Library.Authentication.UserToken Token to verify
리턴 bool