Skip to content

archanpatkar/Tachyon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Instantiable Server Framework in Kotlin

Introduction

A Tachyon is an instantiable unit server. This library provides three types of Tachyons -

Tachyon Nature
Single Single
Serial Blocking ( will Block Clients )
Concurrent Non Blocking ( will accept arbitary clients without blocking them )

Example Usage

SingleTachyon

import java.net.*;
import java.io.*;
import com.archanpatkar.tachyon.SingleTachyon;

fun main(args: Array<String>)
{
  val st1 = SingalTachyon(8081); // Port Number
  st1 start { soc,nis,nos ->
    nos.println("hello from the other side!")
  }
}

SerialTachyon

import java.net.*;
import java.io.*;
import com.archanpatkar.tachyon.SerialTachyon;

fun main(args: Array<String>)
{
  val set1 = SerialTachyon(8081,10); // Port Number , Number of Connections
  set1 start { soc,nis,nos ->
    nos.println("hello from the other side!")
  }
}

ConcurrentTachyon

import java.net.*;
import java.io.*;
import com.archanpatkar.tachyon.ConcurrentTachyon;

fun main(args: Array<String>)
{
  val ct1 = ConcurrentTachyon(8081); // Port Number
  ct1 start { soc,nis,nos ->
    nos.println("hello from the other side!")
  }
}

About

An Instantiable Server ✨Framework in Kotlin

Resources

License

Stars

Watchers

Forks

Packages

No packages published