Return on the Go program when we don't manage to lock.
Genericized the response from the socket server and fixed a bad_argument error.
Whitespace.
Added the unlock function and renamed reserve to lock.
Made the lock a type so it will be easier to make threadsafe.