Skip to content

Instantly share code, notes, and snippets.

🐷
Pig Year

Yale yale8848

🐷
Pig Year
Block or report user

Report or block yale8848

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yale8848
yale8848 / local_port_soket.java
Created Mar 29, 2019
Java socket request by local port
View local_port_soket.java
private static void test(){
try {
String path = "/";
String host = "publicobject.com";
int port = 80;
Socket socket = new Socket(InetAddress.getByName(host),port,InetAddress.getByName("172.16.1.251"),39981);
socket.setKeepAlive(false);
OutputStreamWriter osw = new OutputStreamWriter(socket.getOutputStream(),"utf-8");
osw.write("GET " + path + " HTTP/1.0\r\n");
@yale8848
yale8848 / httpclient.go
Created Mar 29, 2019
Go http request by local port
View httpclient.go
// Create by Yale 2019/3/29 9:43
package httpclient
import (
"net"
"net/http"
"time"
)
func GetLocalAddrHttpClient(localIp net.IP, localPort int) *http.Client {
@yale8848
yale8848 / gitstars.json
Created Nov 14, 2017
github stars manager for production
You can’t perform that action at this time.