![]() |
KENSv3
KAIST Educational Network System
|
Server application for the transfer test. More...
Public Member Functions | |
TestTransfer_Accept (Host &host, const std::unordered_map< std::string, std::string > &env) | |
![]() | |
TCPApplication (Host &host) | |
![]() | |
SystemCallApplication (Host &host) | |
![]() | |
virtual void | start () final |
Start and prepare (CREATED -> READY) | |
virtual State | wake () final |
Wake and keep running (READY -> RUNNING) More... | |
virtual void | ready () final |
Mark ready (WAITING -> READY) | |
Protected Member Functions | |
int | E_Main () |
This does a role of int main(int argc, char** argv, char** env). The main functions of multiple applications run in parallel. More... | |
![]() | |
virtual int | socket (int domain, int type__unused, int protocol) final |
virtual int | close (int fd) final |
virtual int | bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) final |
virtual int | getsockname (int sockfd, struct sockaddr *addr, socklen_t *addrlen) final |
virtual int | getpeername (int sockfd, struct sockaddr *addr, socklen_t *addrlen) final |
virtual int | read (int fd, void *buf, size_t count) final |
virtual int | write (int fd, const void *buf, size_t count) final |
virtual int | connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen) final |
virtual int | listen (int sockfd, int backlog) final |
virtual int | accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen) final |
virtual int | nsleep (uint64_t nanoseconds) final |
virtual int | usleep (uint64_t microsleep) final |
virtual int | msleep (uint64_t millisleep) final |
virtual int | sleep (uint64_t sleep) final |
virtual int | gettimeofday (struct timeval *tv, struct timezone *tz) final |
![]() | |
virtual void | initialize () final |
Standard C++11 thread is automatically launched, so we cannot control the starting time. Calling this function guarantees that E_Main thread is successfully launched. | |
virtual int | E_Syscall (const SystemCallInterface::SystemCallParameter ¶m) final |
This is equivalent to INT 0x80 instruction of Linux. This function may be blocked if the system call is blocking call. More... | |
virtual void | returnSyscall (int retVal) final |
Time | getCurrentTime () |
![]() | |
Runnable () | |
Constructs a Runnable interface. | |
virtual void | wait () final |
Enter wait state (RUNNING -> WAITING) | |
virtual void | pre_main () |
Prepare logic. | |
virtual void | run () final |
Thread code. | |
Protected Attributes | |
std::unordered_map< std::string, std::string > | env |
Additional Inherited Members | |
![]() | |
enum class | State { CREATED , STARTING , READY , RUNNING , WAITING , TERMINATED } |
Server application for the transfer test.
This application is configured by the following environment variables.
CONNECT_ADDR
, CONNECT_PORT
: Parameters to configure a listening socket.CONNECT_TIME
: Arbitrary sleeping time before starting the handshake. If the handshake is completed but the established connection is not consumed by the server's listen
system call, the backlog count will be decreased by one.START_TIME
: Arbitrary sleeping time before starting the data transfer.RANDOM_SEED
: This random seed is used to generate a pseudo-random byte stream. If a pair of server and client shares the same seed, the seed is used to generate and verify the data integrity.SENDER
: Determines who will send the data. Data transfer can be done in either client-to-server and server-to-client directions.BUFFER_SIZE
: Size of the buffer to be used in every write
or read
system call.LOOP_COUNT
: How many times the write
system call will be invoked.EXPECT_SIZE
: Expected length of the received data.
|
inlineprotectedvirtual |
This does a role of int main(int argc, char** argv, char** env). The main functions of multiple applications run in parallel.
param | Parameters for system call. |
Implements E::SystemCallApplication.