10 2020 档案

摘要:if (clientSocket.Connected) { } 阅读全文
posted @ 2020-10-31 03:25 WP-WangPin 阅读(263) 评论(0) 推荐(0)
摘要:private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { // button2.Focus(); button1_Click(sender, e); } if ( 阅读全文
posted @ 2020-10-31 03:18 WP-WangPin 阅读(2040) 评论(0) 推荐(1)
摘要:阻塞模式 Windows套接字在阻塞和非阻塞两种模式下执行I/O操作。在阻塞模式下,在I/O操作完成前,执行的操作函数一直等候而不会立即返回,该函数所在的线程会阻塞在这里。相反,在非阻塞模式下,套接字函数会立即返回,而不管I/O是否完成,该函数所在的线程会继续运行。 在阻塞模式的套接字上,调用任何一 阅读全文
posted @ 2020-10-31 02:53 WP-WangPin 阅读(2298) 评论(0) 推荐(0)
摘要:在keypress事件中 private void richTextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '\r') { textbox.Focus(); } if (e.KeyChar == Sys 阅读全文
posted @ 2020-10-31 02:33 WP-WangPin 阅读(128) 评论(0) 推荐(0)
摘要:Environment.Exit(0)//可以退出单独开启的线程 阅读全文
posted @ 2020-10-30 21:50 WP-WangPin 阅读(129) 评论(0) 推荐(0)
摘要:Application.ExitThread();//释放所有线程 阅读全文
posted @ 2020-10-30 21:01 WP-WangPin 阅读(886) 评论(0) 推荐(0)
摘要:listenerThread.Abort(); 阅读全文
posted @ 2020-10-30 20:55 WP-WangPin 阅读(205) 评论(0) 推荐(0)
摘要:DialogResult result = MessageBox.Show("你将删除账号中所有的课程信息,删除后将不可恢复,是否继续删除?", "确认删除", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == D 阅读全文
posted @ 2020-10-30 18:04 WP-WangPin 阅读(95) 评论(0) 推荐(0)
摘要:返回用来收发数据的套接字 private Socket getSocket(string ip, int p) { Socket socketclient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType 阅读全文
posted @ 2020-10-30 17:59 WP-WangPin 阅读(780) 评论(0) 推荐(0)
摘要:public string GetLocalIp() { ///获取本地的IP地址 string AddressIP = string.Empty; foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).Addres 阅读全文
posted @ 2020-10-30 17:51 WP-WangPin 阅读(139) 评论(0) 推荐(0)
摘要:Convert.ToInt32("123"); 阅读全文
posted @ 2020-10-30 17:49 WP-WangPin 阅读(1357) 评论(0) 推荐(0)
摘要:class Deque { constructor() { this.count = 0; this.lowestCount = 0; this.items = {}; } addFront(element) { if (this.isEmpty()) { this.addBack(element) 阅读全文
posted @ 2020-10-29 13:24 WP-WangPin 阅读(118) 评论(0) 推荐(0)
摘要:客户端 import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class Client { public static v 阅读全文
posted @ 2020-10-28 20:47 WP-WangPin 阅读(78) 评论(0) 推荐(0)
摘要:class Queue { constructor() { this.count = 0; this.lowestCount = 0; this.items = {}; } enqueue(element) { this.items[this.count] = element; this.count 阅读全文
posted @ 2020-10-27 22:19 WP-WangPin 阅读(118) 评论(0) 推荐(0)
摘要:class Stack { constructor() { this.count = 0; this.items = {}; } push(element) { this.items[this.count] = element; this.count++; } pop() { if (this.is 阅读全文
posted @ 2020-10-27 16:43 WP-WangPin 阅读(100) 评论(0) 推荐(0)
摘要:class StackArray { constructor() { this.items = []; } push(element) { this.items.push(element); } pop() { return this.items.pop(); } peek() { return t 阅读全文
posted @ 2020-10-26 23:14 WP-WangPin 阅读(116) 评论(0) 推荐(0)
摘要:<body> <input type="text"> <button>发送</button> </body> <script> var sent = document.querySelector('button'); var search = document.querySelector('inpu 阅读全文
posted @ 2020-10-11 11:08 WP-WangPin 阅读(159) 评论(0) 推荐(0)
摘要:<body> <div></div> <script> var div = document.querySelector('div'); retNowTime(); setInterval(retNowTime, 1000); function retNowTime() { var date = n 阅读全文
posted @ 2020-10-11 10:23 WP-WangPin 阅读(102) 评论(0) 推荐(0)