Generally I feel more comfortable when Rex TCP sockets use the rex methods "put" and "get_once" to send and get data, but since others have already reviewed this code and feel comfortable with using the send and recv ruby methods, it won't be an stopper on my side! I just point in case someone else would like to review or pay attention here.