File: tests/manually/ServerTestManually.php

Recommend this page to a friend!
  Classes of Maik Greubel  >  PHP Generics  >  tests/manually/ServerTestManually.php  >  Download  
File: tests/manually/ServerTestManually.php
Role: Unit test script
Content type: text/plain
Description: Unit test for manually testing ServerSocket
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Test enhancement
Date: 1 year ago
Size: 641 bytes
 

Contents

Class file image Download
<?php
set_include_path
(get_include_path() . PATH_SEPARATOR . realpath('../../src'));

require_once
'Generics/Socket/Socket.php';
require_once
'Generics/Socket/ServerSocket.php';
require_once
'Generics/Socket/ServiceCallback.php';
require_once
'Generics/Socket/Endpoint.php';
require_once
'Generics/Socket/SocketException.php';

require
'./TestServerSocketCallback.php';

use
Generics\Socket\ServerSocket;
use
Generics\Socket\Endpoint;

use
tests\manually\TestServerSocketCallback;

$serverEndpoint = new Endpoint('127.0.0.1', 8421);
$server = new ServerSocket($serverEndpoint);
$server->serve(new TestServerSocketCallback($serverEndpoint));


For more information send a message to info at phpclasses dot org.