Skip to content

mohammedhrima/ura-tcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ura-tcp-server

A TCP chat server and client implemented in Ura — a compiled, statically-typed language with Python-like syntax.

Getting the compiler

curl -L https://raw.githubusercontent.com/mohammedhrima/ura-lang/main/build/ura -o ura
chmod +x ura
git clone https://github.com/mohammedhrima/ura-lib ura-lib

Usage

./ura <file.ura>          # compiles and runs — executable named after source file
./ura <file.ura> -o app   # custom output name

Running the server and client

Open two terminals:

Terminal 1 — start the server:

./ura basic/server.ura   # compiles to ./server and runs it
# Listens on port 17000

Terminal 2 — connect a client:

./ura basic/client.ura   # compiles to ./client and runs it
# Connects to localhost:17000

Type messages in either terminal and they will be echoed to the other side.

Project structure

basic/
  server.ura    TCP server (accepts one client, bidirectional messaging)
  client.ura    TCP client
  utils.ura       Shared networking utilities (SockAddr, logging helpers)
cmd/
  server.ura    Command-based server variant
  client.ura    Command-based client variant
  utils.ura       Shared networking utilities (SockAddr, logging helpers)

About Ura

Ura is a compiled language that targets native code via LLVM. Source: github.com/mohammedhrima/ura-lang

About

tcp chat server and client implemented in ura-lang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages