SocketBase trait and consts.rs