rust_tcp_sever 0.1.9

A simple and lightweight crate for launching and using a server
Documentation
rust_tcp_sever-0.1.9 has been yanked.

Rust TcpSever

A simple and lightweight crate for launching and using a server.

Reasons to choose Rust-TcpSever:


  • Ease of Use!
  • Small Library Size!
  • Supports all Types of Files!

Used Library:

Contact with the developer.

Future of the library

The library will be updated as new proposals and ideas are received. If I no longer want to develop this project, I will write about it. I will try to post a new update every month

Usage example:

extern crate rust_tcp_sever;
pub use rust_tcp_sever::*;

fn main() {
   TcpServer::set_server(
       TcpListener::bind("127.0.0.1:443").unwrap()
   );
   Server::launch(4);
}

struct Server;

impl SeverControl for Server {
   const FN_READ: FnRead = TcpServer::read_stream;
   const FN_WRITE: FnWrite = TcpServer::write_stream;

   #[inline]
   fn check_stream(_stream: &TcpStream) -> bool { true }

   #[inline]
   fn parser_request(_stream: &TcpStream, request: &Request, response: &mut Response) {
       println!("{request:#?}");
       println!("{response:#?}");
   }
}

License

This project is licensed under a Proprietary License.

Summary:

  • By downloading the library, you automatically agree to the license.
  • You can only change your copy of the project downloaded from GitHub.
  • You can only download the library from GitHub or crates.io.
  • It is prohibited to forward even an unmodified copy to other people.
  • Copyright of this software remains with the author. All rights reserved.
  • The author does not bear any responsibility for damage caused.