
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Use your TCP connections with working timeout.
This gem implements a customizable TCP client class that gives you control over time limits. You can set time limits for individual read or write calls or set a deadline for entire call sequences. It has a very small footprint, no dependencies and is easily useable.
require 'tcp-client'
# create a configuration:
# - don't use internal buffering
# - use at least TLS 1.2
cfg =
TCPClient::Configuration.create(
buffered: false,
ssl_params: {
min_version: :TLS1_2
}
)
# request to Google.com:
# - limit all network interactions to 1.5 seconds
# - use the Configuration cfg
# - send a simple HTTP get request
# - read the returned message and headers
response =
TCPClient.with_deadline(1.5, 'www.google.com:443', cfg) do |client|
client.write("GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n") #=> 40
client.readline("\r\n\r\n") #=> see response
end
puts(response)
For more samples see the examples dir
You can install the gem in your system with
gem install tcp-client
You can use Bundler to add TCPClient to your own project:
bundle add tcp-client
After that you only need one line of code to have everything together
require 'tcp-client'
FAQs
Unknown package
We found that tcp-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.