Metadata-Version: 2.4
Name: javacs
Version: 2.0.1
Summary: Prints Java socket/RMI networking practical programs on demand
Home-page: 
Author: andhrew
Author-email: xyz@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# Java Networking Practicals (`javacs`)

A Python package that stores Java networking practical programs (TCP/UDP sockets, chat, broadcast, RPC and RMI) and prints their source code on demand, from Python or the terminal.

Install it once with `pip`, then view any program on any machine without copying files around.

---

## Programs Included

| Name | Description |
|---|---|
| `calclient` / `calserver` | RPC-style calculator over UDP (`DatagramSocket`) |
| `chatclient` / `chatserver` | TCP chat between client and server |
| `dateclient` / `dateserver` | RMI date/time server and client |
| `eoclient` / `eoserver` | UDP program that checks whether a number is even or odd |
| `primeclient` / `primeserver` | TCP program that checks whether a number is prime |
| `socketclient` / `socketserver` | Broadcast server and client |
| `date` | Extra program |

---

## Step 1: Install

```bash
pip install javacs
```

To update to the latest version:

```bash
pip install --upgrade javacs
```

Requires Python 3.6 or newer.

---

## Step 2: View the programs

### Option A: From the terminal

Show all programs:

```bash
javacs
```

Show a single program:

```bash
javacs chatserver
javacs primeclient
```

### Option B: From Python

```python
import javacs

javacs.show_codes()               # Show all programs
javacs.show_codes("chatserver")   # Show one program
```

### Option C: In Google Colab or Jupyter

```python
!pip install javacs
import javacs
javacs.show_codes("eoserver")
```

---

## Publishing a new version (for maintainers)

1. Make any additions or updates in the `javacs/` folder.
2. Increment `version` in `setup.py`.
3. Clean old builds:
   ```bash
   rm -rf dist build *.egg-info
   ```
4. Build:
   ```bash
   python3 -m build
   ```
5. Check and upload to PyPI:
   ```bash
   python3 -m twine check dist/*
   python3 -m twine upload dist/*
   ```

---

## License

MIT. See [LICENSE](LICENSE).
