Konloch Software

Vortex IO

Published 03/01/2023 Updated 03/20/2023

Vortex-IO is a high performance low-level non-blocking tcp socket server API.

What Does It Do?

  • Small Java Library that provides an API creating a persistent NIO TCP server.
    • Non-Blocking-IO TCP server.

Links

Requirements

  • Java 8 or greater

How To Integrate as a Dependency

Add the following to your pom.xml as a maven dependency, or just download the latest release and import it with your IDE.

<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>Socket-Server</artifactId>
  <version>0.9.4</version>
</dependency>

How To Use

You can view an HTTP Server implementation here, or an IRC Server implementation here, or an Echo Server implementation here.

RFC-862 compliant echo server

SocketServer server = new SocketServer(7, client -> 
{
    switch(client.getState())
    {
        //signal we want to start reading into the buffer
        case 0:
            //signal that we want to start reading and to fill up the buffer
            client.setInputRead(true);
            
            //advance to stage 1
            client.setState(1);
            break;
            
        //wait until the stream has signalled the buffer has reached the end
        case 1:
            //when the buffer is full advance to stage 2
            if(!client.isInputRead())
                client.setState(2);
            break;
            
        //announce the read
        case 2:
            //get the bytes written
            byte[] bytes = client.getInputBuffer().toByteArray();
            
            //reset the input buffer
            client.getInputBuffer().reset();
        
            //echo the bytes back
            client.write(bytes);
            
            //loop back to stage 0
            client.setState(0);
            break;
    }
});
server.start();

Latest Updates

Vortex IO v0.9.5

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.5</version> 
</dependency> 

Links…

Read More

Vortex IO v0.9.4

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.4</version> 
</dependency> 

Links…

Read More

Vortex IO v0.9.3

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.3</version> 
</dependency> 

Links…

Read More

Vortex IO v0.9.2

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.2</version> 
</dependency> 

Links…

Read More

Vortex IO v0.9.1

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.1</version> 
</dependency> 

Links…

Read More

Vortex IO v0.9.0

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.9.0</version> 
</dependency> 

Links…

Read More

Vortex IO v0.8.1

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.8.1</version> 
</dependency> 

Links…

Read More

Vortex IO v0.8.0

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.8.0</version> 
</dependency> 

Links…

Read More

Vortex IO v0.7.1

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.7.1</version> 
</dependency> 

Links…

Read More

Vortex IO v0.7.0

Please feel free to report any issues found.

To add it as a maven dependency:

<dependency> 
 <groupId>com.konloch</groupId> 
 <artifactId>Socket-Server</artifactId> 
 <version>0.7.0</version> 
</dependency> 

Links…

Read More