websocket 用c++编写客户端的问题

用MFC CAsyncSocket这个类的socket与服务器connect之后,

我发送了头:Sec-WebSocket-Key,Sec-WebSocket-Version: 13 等内容


请问有websocket 用c++编写客户端 示例代码吗?



lianghaoming7 图片发上来了,如果你懂得话麻烦帮我看下谢谢了。
4 年多之前 回复
lianghaoming7 呃,我用chrome抓包看到里面的frame.看到是定义发送一串字符串过去,然后服务器返回sys_auth=SUCCEED,可是我发送过去之后没有得到服务器的返回呢。
4 年多之前 回复


CSocket sockect;
CString ip =_T( "");
bool ret = sockect.Connect(ip,8080);
if (ret)
Json::Value root;
root["lsh"] = "1234567890123";
root["clbh"] = "j001";
root["clbh"] = "j001";
root["kskm"] = "1";
root["sfzhm"] = "12345678";
root["kssj"] = "2015/11/25 9:52:12";
root["czlx"] = "0";

    string ss = root.toStyledString();
    string strlen;

    int len = ss.size();
    stringstream temp;
    temp << len;
    temp >> strlen;

    // char *p = new char[len + 10];
    string data = "$$";
    sockect.Send(data.c_str(), data.size());

Csdn user default icon
websocket 用c++编写客户端的问题

用MFC CAsyncSocket这个类的socket与服务器connect之后, 我发送了头:Sec-WebSocket-Key,Sec-WebSocket-Version: 13 等内容 等取得了服务器返回的应答:Sec-WebSocket-Accept,Upgrade:Websocket等内容 应该是握手成功了。 之后我在用CAsyncSocket的send发送文本过去服务器就没有返回数据了,服务器也木有向我返回数据。是不是发送的数据要经过编码或者是什么? 请问有websocket 用c++编写客户端 示例代码吗?

websocketd搭建的websocket server如何区别客户端不同请求的问题


WebSocket 服务端与客户端互发消息问题?

WebSocket 如果服务端不停的发消息给客户端,客户端处理消息又不停的给服务端发处理结果消息,这样会有什么问题?本人遇到的情况是如果服务端一直在发,就收不到客户端发的消息,是不是因为只有一个连接通道,服务端和客户端不能同时发?


<div class="post-text" itemprop="text"> <p>I started a personal project from gorilla chat example. Every time a client calls "register" I check if it has an opponent. Suppose clients are game players. What I am trying to do is to couple clients two per two.</p> <p>Clients are:</p> <pre><code>type Client struct { hub *Hub opponent *Client conn *websocket.Conn send chan []byte } </code></pre> <p>So when I client call register, if exists one client with opponent nil, I tie two clients with</p> <pre><code>c.opponent = client client.opponent = c </code></pre> <p>And then, I send together a message:</p> <pre><code>c.conn.WriteMessage(websocket.TextMessage, dat) client.conn.WriteMessage(websocket.TextMessage, dat) </code></pre> <p>but no one receive the message. How can I send a message to just two clients?</p> <pre><code>package main import ( "github.com/gorilla/websocket" "log" ) func newHub() *Hub { return &amp;Hub{ broadcast: make(chan []byte), register: make(chan *Client), unregister: make(chan *Client), clients: make(map[*Client]bool), } } func (h *Hub) run() { for { select { // register new client case client := &lt;-h.register: log.Println("register") h.clients[client] = true for c := range h.clients { if c != client { if c.opponent == nil { c.opponent = client client.opponent = c dat := []byte(`{"foo":"bar"}`) c.conn.WriteMessage(websocket.TextMessage, dat) client.conn.WriteMessage(websocket.TextMessage, dat) } } } case client := &lt;-h.unregister: log.Println("unregister") if _, ok := h.clients[client]; ok { delete(h.clients, client) close(client.send) } case message := &lt;-h.broadcast: for client := range h.clients { select { case client.send &lt;- message: default: close(client.send) delete(h.clients, client) } } } } } </code></pre> </div>

websocket server 返回给客户端数据报错

![图片说明](https://img-ask.csdn.net/upload/201611/03/1478166374_946184.png) 自己写了一个websocket server 客户端通过websocket 发送 111 给server, server 收到后返回111 给客户端, 客户端收到报错。 ![图片说明](https://img-ask.csdn.net/upload/201611/03/1478166687_970719.png) 是我组装的返回报文错了吗, 哪位大神帮忙看一下,谢谢!


服务器mosquitto 及 websocket 已经安装好了, 配置:config.mk WITH_WEBSOCKETS:=yes 配置:mosquitto.conf 35 pid_file /var/run/mosquitto.pid 43 user root 136 port 1883 144 max_connections -1 277 listener 36036 297 protocol websockets 513 allow_anonymous true 启动:mosquitto -c /etc/mosquitto/mosquitto.conf 1513821115: mosquitto version 1.4.11 (build date 2017-12-19 14:12:55+0800) starting 1513821115: Config loaded from /etc/mosquitto/mosquitto.conf. 1513821115: Opening websockets listen socket on port 36036. 1513821115: Opening ipv4 listen socket on port 1883. 1513821115: Error: Address already in use mosquitto_sub mosquitto_pub 正常订阅和发布; 用下面HTML客户端测试: http://blog.csdn.net/qq_28877125/article/details/78350479 http://blog.csdn.net/a358763471/article/details/44200401 http://blog.csdn.net/M348915654/article/details/53616837 都没有连上服务器; 帮我找找问题在哪

spring boot websocket wss 客户端

1.目前需要做依据spring-websocket基础上的WSS的客户端,目前只实现了ws,不知道如何实现WSS 2. 创建连接的代码 //连接 public static boolean connection(String name, String host, int port) { String url = "wss://" + host + ":" + port + "/websocket/" + name; WebSocketConnectionManager manager = new WebSocketConnectionManager(client(), handler(), url); manager.setAutoStartup(true); HttpHeaders httpHeaders = new HttpHeaders(); manager.setHeaders(httpHeaders); manager.start(); } //client @Bean public static StandardWebSocketClient client() { return new StandardWebSocketClient(); } 目前是不知道如何生成一个带TLS的StandardWebSocketClient,希望有人帮忙看看


客户端使用websocket,服务器使用Java Socket。客户端经过new webSocket(utl)之后,服务器端可以收到请求头,但是客户端的webSocket.readyState一直是0,没有连接成功,这个是因为什么呢?是不是因为服务器端不可以用Java Socket

如何使用Go和gorilla websocket仅发送给一个客户端,而不是所有客户端

<div class="post-text" itemprop="text"> <p>I am trying to learn websockets with Go. I have been looking at examples with gorilla websocket.</p> <p>I have checked out these 2 examples that show how to use gorilla websocket:</p> <p><a href="https://github.com/gorilla/websocket/tree/master/examples" rel="nofollow">https://github.com/gorilla/websocket/tree/master/examples</a></p> <p><a href="https://www.youtube.com/watch?v=ysAZ_oqPOo0" rel="nofollow">https://www.youtube.com/watch?v=ysAZ_oqPOo0</a></p> <p>All of these examples show how to connect to a websocket server, send and receive texts. But what I don't understand is how you can send to only one client. Because in a real world application you will have users, and we don't want all users to receive the same message and same data. Is there a way for me to get the unique id of a connection which I can save in a database like redis and link it to a user id in the same database, and then use that websocket id to send back to a specific client if that user id received a message or a notification? Is this how one would go about and achieve something like this? If that is the case, how would I that?</p> </div>


<div class="post-text" itemprop="text"> <p>I want to create a real time Web chat app.</p> <p>And trying to do it with ratchet. As a beginner I am not able to understand where I m Goin wrong. I have copied the whole Content from socketo.me and it worked in terminal using "telnet localhost 8080" but when I want to achieve the same thing using my browser it doesn't.</p> <p>I put localhost:8080 in url and shows blank, where I want to view my index.php.</p> <p>Plz help me. Where the localhost:8080 is pointing and where should I place my index. Php</p> <p><a href="https://i.stack.imgur.com/Ymqr7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ymqr7.png" alt="my directory looks like this"></a></p> </div>

Golang Websocket客户端关闭了连接

<div class="post-text" itemprop="text"> <p>I have a golang connection. If the client opened the connection the database change the online column to 1. Here is my code but I didnt implement the last thing. My question, how can I change the database column to 0 if the client closed the connection. How can I track the client, and catch the connection close? </p> <pre><code>package main import ( "golang.org/x/net/websocket" "fmt" "log" "net/http" "strconv" ) type Clients struct { webs *websocket.Conn clientAddr string id int } var ( ActiveClients = make(map[Clients]int) ) func Echo(ws *websocket.Conn){ var err error client := ws.Request().RemoteAddr sockCli := Clients{webs: ws, clientAddr: client, id: 0} ActiveClients[sockCli] = 1 for{ var reply string if err = websocket.Message.Receive(ws, &amp;reply); err != nil{ fmt.Println("Cant receive", err) break }else{ if sockCli.id == 0{ sockCli.id, err = strconv.Atoi(reply) } } if err = websocket.Message.Send(ws, "id:"+strconv.Itoa(sockCli.id)); err != nil{ fmt.Println("Cant send") } for cs, _ := range ActiveClients { if cs.id == 1{ if err = websocket.Message.Send(cs.webs, "asd"); err != nil { // we could not send the message to a peer log.Println("Could not send message to ", cs.clientAddr, err.Error()) } }else { fmt.Println("No") } } } } func main(){ http.Handle("/", websocket.Handler(Echo)) if err := http.ListenAndServe(":1234", nil); err != nil{ log.Fatal("ListenAndServe: ", err) } } </code></pre> </div>



Gorilla Websocket手动关闭客户端连接

<div class="post-text" itemprop="text"> <p>I try to close connect manual(use <a href="https://dwst.github.io/" rel="nofollow noreferrer">Dark WebSocket Terminal</a>),but the client tell me 1005 (No Status Rcvd)<br> Server:</p> <pre><code>ReadLoop: for { mt, message, err := c.ReadMessage() if err != nil { log.Println("read:", err) log.Println("messageType:", mt) if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) { log.Printf("error: %v", err) } c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) break ReadLoop } log.Printf("recv: %s", message) //do sth in here err = c.WriteMessage(mt, message) if err != nil { //WriteMessage wrong log.Println("write:", err) break ReadLoop } } </code></pre> <p>It is not work and show the expected outputting the following:</p> <pre><code>read: websocket: close 1005 (no status) messageType: -1 error: websocket: close 1005 (no status) </code></pre> <p>How should i go about this?</p> </div>

websocket 服务端 客户端连接

这是服务端代码:var express = require('express'), app = express(), server = require('http').createServer(app), io = require('socket.io').listen(server); app.use('/',express.static(__dirname+'/www')); //监听8021端口 server.listen(8021); io.on('connection', function (socket) { socket.on('foo', function(data){ console.log(data); }) }) html代码: <body> <div><input id="sendbtn" type="button" value="button" /></div> <script src="../socket.io/socket.io.js"></script> <script type="text/javascript"> var socket = io.connect(), button = document.getElementById('sendbtn'); button.click = function () { socket.emit('foo','hello'); } </script> </body> 二者无法建立连接,和html中socket.IO的位置可能没引对有关系吗


<div class="post-text" itemprop="text"> <p><strong>Hi all!</strong></p> <p>I use swoole for WebSockets.</p> <p><strong>I create clietn part:</strong></p> <pre><code>&lt;script&gt; var ws = new WebSocket('ws://site.ll:9502/?user=tester01'); ws.onmessage = function(evt) { console.log(evt.data); }; ws.onopen = function (event) { ws.send('test'); } &lt;/script&gt; </code></pre> <p><strong>Create WebServer part:</strong></p> <pre><code>$server = new swoole_websocket_server("", 9502); $server-&gt;on("start", function ($server) { echo "Swoole http server is started at "; }); $server-&gt;on('open', function($server, $req) { echo "connection open: {$req-&gt;fd} "; }); $server-&gt;on('message', function($server, $frame) { echo "received message: {$frame-&gt;data} "; $server-&gt;push($frame-&gt;fd, json_encode(["hello", "world"])); }); $server-&gt;on('close', function($server, $fd) { echo "connection close: {$fd} "; }); $server-&gt;start(); </code></pre> <p><strong>Create send from server part:</strong></p> <pre><code>$client = new swoole_client(SWOOLE_SOCK_TCP); if (!$client-&gt;connect('', 9502, -1)) { exit("connect failed. Error: {$client-&gt;errCode} "); } $client-&gt;send("hello world "); echo $client-&gt;recv(); $client-&gt;close(); </code></pre> <p>I trying to create TCP server inside WebSocket server, just adding next part inside "on start" callback:</p> <pre><code>$server2 = new swoole_server("", 9503); $server2-&gt;on('connect', function ($server2, $fd){ echo "connection open: {$fd} "; }); $server2-&gt;on('receive', function ($server2, $fd, $from_id, $data) { $server2-&gt;send($fd, "Swoole: {$data}"); $server2-&gt;close($fd); }); $server2-&gt;on('close', function ($server2, $fd) { echo "connection close: {$fd} "; }); $server2-&gt;start(); </code></pre> <p>But Just receive an error: </p> <blockquote> <p>Swoole\Server::__construct(): eventLoop has already been created. unable to create swoole_server.</p> </blockquote> <p>I need to send data from server to client. How can I do this? In workerman library I doing next: <a href="https://github.com/Shkarbatov/WebSocketPHPWorkerman/blob/master/worker.php" rel="nofollow noreferrer">https://github.com/Shkarbatov/WebSocketPHPWorkerman/blob/master/worker.php</a></p> </div>


<div class="post-text" itemprop="text"> <p><strong>How to authenticate the client connecting to the websocket server?</strong></p> <p>In http we could use Oauth 2.0 to authenticate the user and the client too. But in websocket I am not able to understand how to do so.</p> <p>As far as I can understand for authentication of the user connecting we could just ask the client to send a message with a token to authenticate the user. But how to prevent an un-identified client to connect to the server?</p> <p><strong>Isn't there any header for token based authentication for websocket</strong> as that would allow for both the authentication simultaneously just as in any Oauth 2.0 Rest api authentication. </p> </div>

Golang WebSocket客户端

<div class="post-text" itemprop="text"> <p>I want to make client websocket connections to exertnal server each connection = goroutine and reader. I was looking informations on the internet but I found how to create server websocket tutorials. Can anyone be so kind and make a trivial example and walk me through. I am using standart golang libary <a href="https://golang.org/x/net/websocket" rel="nofollow">https://golang.org/x/net/websocket</a>.</p> <p>I created some code but when I closed one connection program exited with EOF information. I won't post the code because it's probably bad duo to the fact it was my first try.</p> <p>I know how to read/send message from websocket but I don't know how to create multiple connections.</p> <p>Any informations, examples would be appreciate, thanks for reading</p> </div>


<div class="post-text" itemprop="text"> <p>I want to create a websocket client that waits until the server is running. If the connection is closed by the server it should reconnect.</p> <p>What I tried does not work and my code exits with a runtime error:</p> <p><code>panic: runtime error: invalid memory address or nil pointer dereference</code></p> <pre><code>func run() { origin := "http://localhost:8080/" url := "ws://localhost:8080/ws" ws, err := websocket.Dial(url, "", origin) if err != nil { fmt.Println("Connection fails, is being re-connection") main() } if _, err := ws.Write([]byte("something")); err != nil { log.Fatal(err) } } </code></pre> </div>

Golang WebSocket客户端,获取结果后关闭连接

<div class="post-text" itemprop="text"> <p>How I can implement this kind of scenario:</p> <p>1.I have LoginHandler which receives some user data - email and signedXml:</p> <pre><code>func LoginHandler(c *gin.Context) { var ( err error data LoginPost ) if err = c.BindJSON(&amp;data); err != nil { c.JSON(http.StatusBadRequest, gin.H{"status": "error"}) return } ... c.JSON(http.StatusOK, gin.H{"status": "ok"}) } </code></pre> <p>2.I need to send signedXml to another server via websocket</p> <p>3.Save result (success or error)</p> <p>4.Close connection</p> <p>Every HTTP request will open connection, send 1 message, get 1 result and finally close socket. I was trying with channel, but no success. Is this possible to implement my case?</p> <p><strong>UPDATE</strong></p> <pre><code>package main import ( "log" "net/url" "github.com/gorilla/mux" "github.com/gorilla/websocket" "net/http" ) func indexHandler(w http.ResponseWriter, r *http.Request) { message := r.FormValue("message") w.Write([]byte(message)) } func postHandler(w http.ResponseWriter, r *http.Request) { var ( message = r.FormValue("message") u = url.URL{Scheme: "ws", Host: "echo.websocket.org", Path: "/"} err error out []byte conn *websocket.Conn ) log.Printf("message: %s ", message) log.Printf("connecting to %s ", u.String()) conn, _, err = websocket.DefaultDialer.Dial(u.String(), nil) if err != nil { log.Fatal("dial:", err) } log.Println("write") if err = conn.WriteMessage(websocket.TextMessage, []byte(message)); err != nil { log.Fatal("write:", err) } log.Println("read") if _, out, err = conn.ReadMessage(); err != nil { log.Fatal("read:", err) } w.Write(out) log.Println("close") conn.Close() } func main() { r := mux.NewRouter() r.HandleFunc("/", indexHandler).Methods("GET") r.HandleFunc("/post", postHandler).Methods("POST") http.Handle("/", r) http.ListenAndServe(":8080", nil) } </code></pre> </div>


<div class="post-text" itemprop="text"> <p>I am trying to send data to PHP websocket server, although it sends the data but the data received is a garbage values. How can fix this to get correct values posted to websocket php server?</p> <p>Below is my websocket php client script</p> <pre><code>&lt;?php $host = 'example.com:9000/server.php'; //where is the websocket server $port = 9000; //ssl $local = "http://localhost/"; //url where this script run $data = json_encode(array("server_msg"=&gt; "1","device_id"=&gt; "DDD-123455678")); //data to be send $head = "GET / HTTP/1.1"." ". "Host: $host"." ". "Upgrade: websocket"." ". "Connection: Upgrade"." ". "Sec-WebSocket-Key: asdasdaas76da7sd6asd6as7d"." ". "Sec-WebSocket-Version: 13"." ". "Content-Length: ".strlen($data)." "." "; ////WebSocket handshake $sock = fsockopen($host, $port, $errno, $errstr, 2); fwrite($sock, $head ) or die('error:'.$errno.':'.$errstr); $headers = fread($sock, 2000); fwrite($sock, "\x00$data\xff" ) or die('error:'.$errno.':'.$errstr); $wsdata = fread($sock, 2000); //receives the data included in the websocket package "\x00DATA\xff" $retdata = trim($wsdata,"\x00\xff"); //extracts data ////WebSocket handshake fclose($sock); echo $retdata; ?&gt; </code></pre> <p>Thanks</p> <p>Hi, </p> <p>I have already tried it and it gives me error as below:</p> <p>Fatal error: Uncaught exception 'WebSocket\ConnectionException' with message 'Connection to 'ws://************/server.php' in /var/www/webclientphp/vendor/textalk/websocket/lib/Client.php on line 149</p> <p>WebSocket\ConnectionException: Connection to 'ws://************/server.php' failed: Server sent invalid upgrade response: HTTP/1.1 101 Web Socket Protocol Handshake Upgrade: websocket Connection: Upgrade WebSocket-Origin: ************ WebSocket-Location: ws://************:9000/demo/shout.php Sec-WebSocket-Accept:Kfh9QIsMVZcl6xEPYxPHzW8SZ8w= in /var/www/webclientphp/vendor/textalk/websocket/lib/Client.php on line 149</p> <p>Please help</p> </div>


大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...


今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...



技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...






中国大学生占总人口不到5% 2017年,中国整体的本科率仅有5.9%;如果算上研究生,这一比例可以进一步上升到6.5% 为什么在国家统计局推出的这份年鉴中,学历的最高一阶就是到研究生,而没有进一步再统计博士生的数量的。 原因其实并不难理解,相比全国和各省整体人口体量,博士生的占比非常之低,属于绝对意义上的小概率样本。 这一点,我们从上表中的各省研究生占比情况也可以看出端倪。除北京、天津、上海三...


提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...






私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...




今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...


即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...


场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...


我在年前从上一家公司离职,没想到过年期间疫情爆发,我也被困在家里,在家呆着的日子让人很焦躁,于是我疯狂的投简历,看面试题,希望可以进大公司去看看。 我也有幸面试了我觉得还挺大的公司的(虽然不是bat之类的大厂,但是作为一名二本计算机专业刚毕业的大学生bat那些大厂我连投简历的勇气都没有),最后选择了中软,我知道这是一家外包公司,待遇各方面甚至不如我的上一家公司,但是对我而言这可是外包华为,能...




当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...


HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...




爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4


编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?



写在开头: 上周面试了一位女程序员,上午10::30来我们部门面试,2B哥接待了她.来看看她的简历: 个人简历 个人技能: ● 熟悉spring mvc 、spring、mybatis 等框架 ● 熟悉 redis 、rocketmq、dubbo、zookeeper、netty 、nginx、tomcat、mysql。 ● 阅读过juc 中的线程池、锁的源...




已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...


前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...


导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...