Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 socket.connect() 方法中提供一定的超时,我不想使用套接字的 beginConnection 方法,因为需要同步连接到套接字,并且只需要在连接时超时,而不是发送和接收。他们有什么办法吗?