Skip to content

YoniShpund/ys_packet_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YS Packet Generator

This is a packet generator Python package.

Installation

pip install ys-packet-generator

Usage

There should be two sides:

  • Client side - which generates the packets
  • Server side - which receive the packets

On the client side

Send UDP packets - unlimited loop

Each packet's data is an increasing index that repeats every 32bit

@param: ip (str) - destination IP address
        port (int) - destination port
        bandwidth (int) - the bandwidth to allocate
        packet_size (int) - size of each packet
        debug (bool) - use prints or not
@returns: None
from ys-packet-generator import generator as pg
...
pg.send(...)

On the server side

Receive UDP packets from the generator - unlimited loop Each packet is an increasing index that repeats every 32bit

@param: ip (str) - local IP address
        port (int) - local port
        buffer_size (int) - buffer size to reveive packets
        full_debug (bool) - print all debug prints
        debug (bool) - print only missed packet's index
@returns: None
from ys-packet-generator import server 
...
server.receive(...)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages