I'm making a library that implements both server and client parts that interacts between them via websockets:
Server use example (ran in CLI):
Server srv = new Server("localhost:1234");
srv.onNewClientConnected.listen(print("client connected"));
Client use example (ran in browser):
Client cli = new Cliente("localhost:1234");
cli.sendCommand(...);
Just by creating the instances, the client should be connected and the server noticed about that connection. What would be the best way to test their interactions? Could I check both objects internals?
Aucun commentaire:
Enregistrer un commentaire