mirror of
				https://github.com/kepler155c/opus
				synced 2025-10-31 15:43:00 +00:00 
			
		
		
		
	socket.lua: Option to pass user generated keypairs
This commit is contained in:
		| @@ -126,7 +126,11 @@ function Socket.connect(host, port, options) | ||||
|  | ||||
| 	local socket = newSocket(host == os.getComputerID()) | ||||
| 	socket.dhost = tonumber(host) | ||||
| 	if options and options.keypair then | ||||
| 		socket.privKey, socket.pubKey = unpack(options.keypair) | ||||
| 	else | ||||
| 		socket.privKey, socket.pubKey = network.getKeyPair() | ||||
| 	end | ||||
| 	local identifier = options and options.identifier or Security.getIdentifier() | ||||
|  | ||||
| 	socket.transmit(port, socket.sport, { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Anavrins
					Anavrins