Had some trouble getting a TCP connection between an OpenComputers program (client) and a java program (server), so I thought I could sare this.
Here is the lua program:
--VARIABLES
local event = require("event")
local net = require("internet")
local term = require("term")
local os = require("os")
local running = true
local con = net.open("192.168.1.100", 6667)
--FUNCTIONS
function sendString(s)
con:write(s)
print('Sending ' .. string.sub(s,1,s:len()-1) .. ' to server...')
con:flush()
end
function reciveString()
local s = con:read()
print('Recived ' .. s .. '