Oracle Clob field Insertation The character is too long

2023-01-19   ES  

This blog is only used to record personal learning progress, and the knowledge is shallow. Welcome everyone to come and communicate. (Some materials sources network, if there is any infringement, delete it immediately)
All articles in my blog are purely studying and do not involve commercial interests. Not suitable for reference, delete yourself!
If it is used for illegal behavior, it has nothing to do with myself

Program based on the Python use TCP protocol to implement communication functions

import socket

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
# Create a socket object, the purpose of selecting AF_inet is to use IPv4 to communicate, and Sock_stream provides connected stable data transmission
ip=socket.gethostname()
#ip=''

port=9999

s.connect((ip,port))

while True:

    while True:
        mes = input("Please enter the information you want to send:")
        if mes != "exit":
            T_mes = bytes(mes,encoding="gbk")
            s.send(T_mes)
            data=s.recv(1024)
            print(str(data,encoding="gbk"))
        else:
            break;
    if mes == "exit":
        break;
        
s.close()

import socket
import platform
import psutil

s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)# Create a socket object, the purpose of selecting AF_inet is to use IPv4 to communicate, and Sock_stream provides connected stable data transmission
ip=socket.gethostname()
#ip=''
port=9999
s.bind((ip,port))# Binding port
s.listen(5)# Set the maximum number of connections

while True:
    print("The server starts, and is listening to the client connection")
    connet, addr = s.accept()  # Create client connection
    while True:
        data=connet.recv(1024).decode()
        print('Client Send Content:',data)
        if data == "show me OS info":
            os = platform.uname()
            reply01 = bytes(str(os), encoding="gbk")
            connet.send(reply01)
        else:
            if data == "show me Disk info":
                m=[]
                a = str(psutil.disk_partitions())+str(len(psutil.disk_partitions()))
                reply02 = bytes(a,encoding="gbk")
                connet.send(reply02)
            else:
                    reply00 = bytes("Command invalid \ n", encoding="gbk")
                    connet.send(reply00)
s.close()

  • First start the server
    在这里插入图片描述
  • and then start the client
    在这里插入图片描述
  • You can send the specified command, but you need to write it yourself. I wrote a check OS version and a disk partition inquiries.
show me OS info
show me Disk info
  • The server also has data from the client sent by the client

end

source

Related Posts

spring cloud netflix service found: Eureka (1) register and run WYX

Android: Pass data and error information Parcel: Unable to Marshal Value when jumping with the Parcelable interface

Quartz Deploy Table ‘HeartBeat.qrtzLocks’ DOESN’T Exist

java experiment 9 rectangular definition and packaging

Oracle Clob field Insertation The character is too long

Random Posts

[Leveldb] Cache (18): BlockCache

React-PARTICLE-JS particle effects realized, browser report error issues

[Reprinted] Some controls of Android soft keyboard

POJ3006, Dirichlet’s theorem on Arithmetic Progressions, Di Likrey theorem.

1 1 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— FindFirstfile traverses the folder Benjamin