As a convenience for backwards compatibility with TCPCLI on the TCPOP_CONNECT opcode, flags can be the sixth parameter if the fifth parameter is a string (i.e. TCPX is called with the TCPCLI syntax):
xcall TCPX, opcode, status, buffer, sockport, hostname, flags