2022
我们一起努力

zerohost(zerohosts)

目录:

  • 1、zero漫画搬运网官网怎么进?
  • 2、抵抗力的英语怎么说
  • 3、.zero域名开放注册吗
  • 4、客户端与服务器端的通讯,C++书写步骤。

zero漫画搬运网官网怎么进?

很多网站都会出现这种情况的,访问量过高需要扩容,或者其他黑客入侵,甚至网站本身休整,都有可能的,耐心等待,会恢复的,一般时间都不常,20天左右就行了。是host文件有问题,也许是host文件里面写入了对这个网站的限制,可以用360恢复电脑最初设置解决,或者,你找到host文件,打开,自己把里面的东西修改一下.最近zero动漫网在备案审核中,过段时间可以开放的,不过zerodm动漫下载网站可以进的等显示网页无法打开的页面的时候,把上面网址的cn改成net就行了。

抵抗力的英语怎么说

resistance

[ri5zistEns]

n.

反抗, 抵抗, 抵抗力, 阻力, 电阻, 阻抗

resistance

[ri5zistEns]

n.

抵抗[制]; 反抗[对]; 抵抗方法[力]

【生】抗病性

【电】阻抗[力, 尼], 抗[耐]...性; 电阻; 电阻器[件, 装置]

break down the enemy's resistance

粉碎敌人的抵抗

abrasive resistance

耐磨力[度]

sales resistance

拒绝购买, 无销路

resistance welding

电阻焊接, 电焊

resistanceless

adj.

resistancelessly

adv.

a piece of resistance

主要品; 压轴; 压桌菜; 出类拔萃的东西

line of least resistance

阻力最小的方向, 最便当的方法

make some [no] resistance

进行[不]抵抗

offer [put up] resistance to [against]

抵抗

passive resistance

消极抵抗, 不顺从

take the line of least resistance

采取阻力最小的路线; 采取最省力的方法

abrasion resistance

抗磨损性

abrasive resistance

耐磨性, 耐磨强度

absorption resistance

吸收电阻

acceleration resistance

加速阻力

acid resistance

耐酸性能[强度]

acoustic resistance

声阻

acoustic radiation resistance

声辐射阻尼

acquired resistance

获得抗(病)性

active resistance

自动抗病性, 自动抵抗力

adapter resistance

附加电阻

added resistance

附加电阻, 扩量程电阻

adjustable resistance

可变电阻; 可变阻抗[阻力]

aerial resistance

天线电阻

aerodynamical resistance

空气动力的阻力

age resistance

耐老化性

ageing resistance

抗老化性能, 耐久性; 时效阻力

air churning resistance

空气扰动阻力, 空气涡流阻力

air circuit resistance

空气循环阻力

alcohol resistance

耐醇性

alkali resistance

抗碱性(能)

all-in resistance

全部投入电阻(变阻器)

alternating -current resistance

交流电阻

anode resistance

阳极电阻

antenna resistance

天线电阻

antenna effective resistance

天线有效电阻

antenna surge resistance

天线波电阻, 天线特性电阻

antibiotic resistance

抗生素抗性, 抗菌素抗性

anti-mist resistance

防雾[抗雾]电阻

apparent resistance

表观电阻, 视在电阻

arc resistance

耐电弧性, (电)弧阻

armature resistance

电枢电阻

artificial resistance

仿真[模拟]电阻

atmospheric resistance

大气阻力

attenuator resistance

阻尼电阻, 衰减电阻

attrition resistance

耐磨耗性

back resistance

反向电阻

back-biased resistance

反馈偏压电阻

ballast resistance

镇定电阻, 镇流电阻; (电气铁路的)轨间电阻

barreter resistance

镇流管电阻

barrier resistance

阻挡层电阻

base resistance

基极电阻

bath resistance

电解质电阻, 电镀液电阻

bead resistance

珠形热敏电阻

behavioristic resistance

行为抗性

bending resistance

抗弯曲性

biasing resistance

偏压电阻, 偏流电阻

biotic resistance

生物抗力

bleeder resistance

旁漏[泄漏]电阻

bleeding resistance

防渗色性

blocking resistance

抗粘连性

blood resistance

抗血性能

blush resistance

抗发白性, 防潮性

body resistance

体电阻

boiling resistance

耐蒸煮性

boiling water resistance

耐沸水性

bond resistance

粘合抗力

brake resistance

制动力, 制动阻力; 制动变阻器

burning resistance

耐燃性

burn-out resistance

抗烧毁能力

calibrating resistance

校准电阻

carbon resistance

炭质电阻

carbon dust resistance

碳粉电阻

cathode resistance

阴极电阻

cathode interlayer resistance

阴极层间电阻

cathode-bias resistance

阴极偏压电阻

cell resistance

(电解)槽电阻

cermet resistance

涂釉电阻, 金属陶瓷电阻

chalk resistance

抗粉化性

characteristic resistance

特性电阻

chilling resistance

耐急冷能力

circuitous resistance

电路电阻

clamp resistance

钳位电阻

coastal climate resistance

耐海岸气候性

coil resistance

线圈电阻

cold resistance

耐寒性, 抗低温性

cold-check resistance

抗冻细裂性, 抗冷脆性

cold-state resistance

冷(态)电阻

collector resistance

集电极电阻

colour-bleeding resistance

换色电阻, 抗混色性, 泄色电阻

combined resistance

合成电阻

compensating resistance

补偿电阻

compound resistance

复合阻力

compression resistance

抗压性; 抗压强度

compressive resistance

压应力, 抗压力, 抗压强度

cone resistance

锥体(压入)阻力

constitutional drought resistance

体质抗旱性

constriction resistance

集中电阻; 接触电阻

contact resistance

接触[接点]电阻; (电刷和换向器间)瞬变电阻

continuous heat resistance

耐热持续性[持久性]

controlling resistance

控制[抑制]电阻

core resistance

中心流体的阻力, (湍流)核心阻力

corona resistance

电晕放电电阻

corrosion resistance

耐(腐)蚀性, 耐蚀力, 抗腐(蚀)性

coupling resistance

耦合电阻

crack resistance

抗龟裂性

crease resistance

耐皱性, 抗皱性

creep resistance

蠕变阻力, 蠕滑阻力, 抗蠕变力; 蠕变强度, 蠕爬极限

crippling resistance

(低于弹性限度的)折曲应力; 折曲回能

critical resistance

临界[中肯]电阻

critical ballast resistance

临界道碴电阻

critical damping resistance

临界阻尼电阻

cross resistance

交叉抗性

crumpling resistance

耐碎裂性

crushing resistance

抗碾性

current bias resistance

偏流电阻

current-limiting resistance

限流电阻

curve resistance

非线性电阻

cutting resistance

切削阻力, 切削抗力, 切削力

damping resistance

阻尼电阻[阻力]

dark resistance

无照电阻, 暗电阻

dead resistance

吸收[消耗]电阻, 整流电阻

decoupling resistance

去耦[退耦]电阻

deformation resistance

变形阻力

dent resistance

耐冲击性

dermal resistance

皮肤电阻

desiccation resistance

抗干燥性

despiking resistance

阻尼(电路)电阻, 削峰电阻

detergent resistance

耐洗涤剂性

detrimental resistance

有害阻力

dielectric resistance

绝缘[介质]电阻

differential resistance

微分电阻, 内阻

differential anode resistance

阳极微分电阻, 交流电阻

diffusion resistance

扩散阻力

dimmer resistance

减光器, 变阻器

dimming resistance

减光电阻

direct-current plate resistance

阳极直流电阻

dirtiness resistance

污垢热阻(在热交换器管壁上)

discharge resistance

放泄电阻, 放电电阻

disease resistance

抗病力, 抗病性

drain resistance

漏电阻

drain-source resistance

漏极-源极电阻

draught resistance

牵引阻力

draw-bar resistance

牵引阻力

driving resistance

打桩阻力

drought resistance

耐旱性, 抗旱性

drug resistance

药物抗性

dummy resistance

假负载电阻

dummy load resistance

仿真负载电阻

dynamic plate resistance

动态板极电阻

earth resistance

地面(接地)电阻

earthquake resistance of structure

结构物抗震性能

eddy(ing) resistance

涡旋阻力

effective resistance

有效电阻

effective input resistance

有效输入电阻

effective thermal resistance

有效热阻

electrolytic resistance

电解电阻

electronic circuit resistance

电子电路电阻

emulsion resistance

抗乳化

entire thermal resistance

总热阻

equivalent resistance

等效电阻[抗力]; 等代抗力

equivalent noise resistance

等效噪声电阻

equivalent parallel resistance

(晶体的)等效并联电阻

erosion resistance

抗腐蚀性

essential resistance

内阻

excitation resistance

励磁电阻

exhaust resistance

排气阻力

external cathode resistance

阴极输出器(的)外电阻

fat resistance

抗油性, 防油性; 防油度

fatigue resistance

耐[抗]疲劳性; 动强度

fault resistance

障碍电阻

feedback resistance

反馈电阻

field resistance

励磁线圈电阻

filament resistance

灯丝电阻

filter resistance

滤波电阻

filtration resistance

过滤阻力

flange resistance

轮缘阻力

flash resistance

耐着火性

flexing resistance

抗挠强度, 抗挠曲阻力

flow resistance

流阻, 抗流变

folding resistance

耐折性; 耐折度

forward differential resistance

正向微分电阻; 动态电阻

fouling resistance

污垢热阻

fracture initiation resistance

断裂初始抗力

frame resistance

线绕可变电阻

freeze resistance

耐寒性; 抗霜性

freeze-thaw resistance

抗冻熔性

fume resistance

耐烟雾性

fungus resistance

抗真(菌)性

gate resistance

栅电阻

generator resistance

发电机电阻

genetic resistance

遗传抗性

germanium photosensitive resistance

锗光敏电阻

glaze resistance

涂釉电阻

go-and-return resistance

环线电阻

graphite resistance

石墨电阻

grease resistance

耐[抗]油性, 耐润滑油性

grid bias resistance

栅(极)偏电阻

grid-cathode resistance

栅-阴电阻

grip resistance

滑动阻力

head-on resistance

迎头阻力

heat transfer resistance (=thermal resistance)

热阻

heater resistance

发热器电阻, 灯丝电阻

heating resistance

加热电阻; 电热电阻器

high-ohmic input resistance

高欧姆输入电阻

high-temperature oxidation resistance

抗高温氧化力[性]

host resistance

寄生抗性

hot tear resistance

抗高温撕裂性

hull resistance

船身阻力

humidity resistance

防潮性能

hydraulic resistance

流体阻力, 水阻力

hysteresis loss resistance

磁滞损耗电阻

immersion resistance

耐浸渍性

impact resistance

冲击[撞击]阻力

incremental resistance

增量电阻, 微分阳极电阻

inertial resistance

惰性[惯性]阻力; 惯抗

infectious drug resistance

可传播的药物抗性

inherent resistance

固有阻力, 固有电阻

ink resistance

抗墨性(能)

input resistance

输入电阻, 入端电阻

insect resistance

昆虫抗药性

insulating resistance

绝缘电阻

intake resistance

进气阻力

interface resistance

层间电阻; 面间电阻

interfacial resistance

界面阻力

intermediate resistance

中间电阻, 接触电阻

internal tearing resistance

内抗撕力

intrinsic resistance

固有电阻, 本征电阻; 固有阻力, 本征阻力

jag resistance

抗切口性能

junction resistance

结电阻

Kapitza thermal resistance

卡毕札热阻

kinetic resistance

运动阻力

leak resistance

抗漏度, 抗漏性

leakage resistance

漏(流)电阻; 泄漏电阻

light resistance

光电阻

line loop resistance

回路电阻

linear resistance

线性电阻

lodging resistance

抗倒伏性

lumped resistance

集中电阻, 集总电阻

magnetic layer resistance

磁层电阻

magneto resistance

磁致电阻

mar resistance

抗(表面)擦伤性

mass transfer resistance

传质阻力

mechanical friction resistance

机械摩擦阻力

mechanical shock resistance

抗机械冲击性能

membrane resistance

薄膜电阻

metal glaze resistance

金属釉电阻

mica resistance

云母电阻

mildew resistance

抗霉性, 防霉性

mold resistance

抗霉性, 抗霉力

negative sequence resistance

负序电阻

net resistance

纯电抗

neutralizing resistance

补偿电阻, 中和电阻, 抵消电阻

nichrome resistance

镍铬电阻

nominal resistance

标称电阻

non-reactive resistance

无电抗电阻; 纯电阻

normalized resistance

标准化电阻; 归一化电阻

off resistance

断开[关态]电阻

ohmic resistance

欧姆电阻

oil and grease resistance

耐油脂性能

oil rub resistance

抗油污

oscillator utilizing negative resistance

负阻振荡器

o**otic resistance

渗透阻力

output resistance

出端电阻

overall heat-transfer resistance

总热阻

oxidation resistance

抗氧化

package dissipative resistance

管壳耗散电阻

parasitic resistance

寄生电阻

passive resistance

无源电阻; 钝态抵抗

peak resistance

峰值[巅值]电阻

peeling resistance

抗剥离性能

perspiration resistance

耐汗性

photocathode resistance

光(电)阴极电阻

photosensitive resistance

光敏电阻

physiological resistance

生理抗性

pick resistance

抗粘性能

plate load resistance

板极负载电阻

plug resistance

插塞电阻

polarization resistance

极化电阻

pore resistance

有效通路系数

potentiometer resistance

电位器电阻, 分压变阻器

preventative resistance

防止短路用的电阻

print resistance

抗粘污性

profile resistance

翼剖面阻力

protopla**ic drought resistance

原生质抗旱性

radiation resistance

辐射电阻[阻力]

reactive resistance

电抗

regulating resistance

调节电阻; 电位计

regulation resistance

调节电阻; 电位器, 分压器, 变阻器

relative resistance

相对电阻

repeating resistance

耦合电阻

resonance resistance

谐振电阻

reverse a-c resistance

反向交流电阻

rod resistance

棒状电阻

rolling frictional resistance

滚动摩擦阻力

rope guiding resistance

导绳阻力

rot resistance

防霉

rotational resistance

转动阻力

rub resistance

耐摩擦性

ruthenium oxide resistance

氧化钌电阻

saturation resistance

饱和电阻

scale resistance

水垢层热阻

scoring resistance

刮伤(表面)阻力

scratch resistance

抗划伤[擦伤]性

scrub resistance

可洗(涤)性; 耐擦洗性

scuff resistance

耐磨损性, (纸的)抗揉搓性

secondary resistance

二次侧电阻, 次级线圈电阻

seizure resistance

抗咬合性

series resistance

串联电阻

shearing resistance

剪切[切断]阻力

sheet resistance

薄膜电阻, 薄层电阻, 表面电阻

shock resistance

耐震强度, 冲击强度; 抗冲击性

short-circuited resistance

短路电阻

show-through resistance

不透明度

shrink resistance

防缩性, 抗缩性

shunt resistance

分流电阻; 分路电阻; 并联电阻

size resistance

施胶度

skid resistance

抗滑, 抗滑力

skin resistance

表面摩擦阻力; 趋肤电阻

slag resistance

抗渣性(抗熔渣侵蚀能力)

sliding-frictional resistance

滑动摩擦阻力

slip resistance

耐滑性; 抗剪强度; 防侧滑性

slope resistance

斜率电阻

**oke stain resistance

抗烟雾污染性

soil resistance

土壤抵抗力; 土壤抗污性

solvent resistance

耐溶剂性

source resistance

电源电阻; 内(电)阻

source bulk resistance

源(体)电阻

spalling resistance

抗散裂强度

spark resistance

火花电阻

specific resistance

比电阻; 电阻率, 电阻系数

specific resistance of unit volume

容积比电阻

spreading resistance

扩展[扩散]电阻

stabilizing resistance

稳流电阻

stain resistance

耐污染性(不指环境污染)

static resistance

静态电阻

steady resistance

镇流电阻, 平衡电阻, 稳流电阻

stretching resistance

抗拉[张]力

structural resistance

结构阻力

suction resistance

吸引阻力

supporting resistance

支承阻力

suppression resistance

抑制电阻

surge resistance

浪涌电阻, 防冲击电阻

swamping resistance

扩程电阻, 稳定电阻

swelling resistance

耐溶胀性

switch resistance

开关电阻

tarnish resistance

抗蚀力, 耐蚀性

tear resistance

抗扯强度, 抗扯性, 抗扯力

temper resistance

回火稳定性

temperature-compensating resistance

补偿电阻温度

tensile resistance

抗拉力

terminating resistance

终端电阻

thermal resistance

热阻, 热变电阻, 热敏电阻

thermal-shock resistance

抗热冲击阻力; 耐热震性, 耐热冲击性, 抗热急变性

throttle resistance

节流阻力

torque resistance

扭矩抗力, 转矩抗力

torsion resistance

扭曲度

torsional resistance

扭转阻力

tower-footing resistance

塔基电阻(铁塔下部与大地间的电阻)

towing resistance

牵引阻力

tractive resistance

牵引阻力

translatory resistance

平移[平动]阻力

turbulent resistance

湍流阻力

twisting resistance

抗扭力, 扭转阻力

ultraviolet resistance

耐紫外线性

valve passage resistance

阀道流动阻力

vapour resistance

水汽隔绝性, 不透汽性

ventilation resistance

通风阻力

vertical yoke resistance

场偏转线圈电阻; 垂直偏转线圈电阻

vibration resistance

振动阻力[阻尼]

video source resistance

视频信号源电阻

virtual resistance

有效电阻

viscosity resistance

粘性[粘滞]阻力

volatility resistance

耐挥发性

wake resistance

尾流阻力

water vapor resistance

水蒸汽不渗透性能

water-logging resistance

抗渍性, 抗淹性

wave resistance

波阻力

wave making resistance

波致阻力

wearing resistance

耐磨性; 磨损阻力, 抗磨力

wet rub resistance

湿耐磨性能

wet-skid resistance

湿滑阻抗[阻力]

windage resistance

风阻

wing resistance

翼阻力

wirewound resistance

线绕电阻

withdraw resistance

拔出阻力

wrinkle resistance

抗皱性

zero voltage resistance

零压电阻

resistance to elements

耐候性, 耐候化性能

resistance to elongation

抗伸长性

resistance to extinction

对消退的抗性

resistance to plane homogeneous deformation

(金属的)均匀面变形阻力

resistance

re.sis.tance

AHD:[r¹-z¹s“t…ns]

D.J.[r!6z!st*ns]

K.K.[r!6z!st*ns]

n.

The act or an instance of resisting or the capacity to resist.

A force that tends to oppose or retard motion.

Often Resistance An underground organization engaged in a struggle for national liberation in a country under military or totalitarian occupation.

Psychology A process in which the ego opposes the conscious recall of unpleasant experiences.

Biology

The capacity of an organi** to defend itself against a disease.

The capacity of an organi** or a tissue to withstand the effects of a harmful environmental agent.

Abbr. r,RElectricity The opposition of a body or substance to current passing through it, resulting in a change of electrical energy into heat or another form of energy.

resis“tant

adj.

resistance

obedience

.zero域名开放注册吗

是的,.zero域名开放注册

2021年全球已开放注册的新顶级域名有哪些?

A

.aaa .aarp .abarth .abb .abbott .abbvie .abc .able .abogado .abudhabi .ac .academy .accenture .accountant .accountants .aco .actor .ad .adac .ads .***** .ae .aeg .aero .aetna .af .afamilycompany .afl .africa .ag .agakhan .agency .ai .aig .airbus .airforce .airtel .akdn .al .alfaromeo .alibaba .alipay .allfinanz .allstate .ally .alsace .alstom .am .amazon .americanexpress .americanfamily .amex .amfam .amica .amsterdam .****ytics .android .anquan .anz .ao .aol .apartments .app .apple .aq .aquarelle .ar .arab .aramco .archi .army .arpa .art .arte .as .asda .asia .associates .at .athleta .attorney .au .auction .audi .audible .audio .auspost .author .auto .autos .avianca .aw .aws .ax .axa .az .azure

B

.ba .baby .baidu .banamex .bananarepublic .band .bank .bar .barcelona .barclaycard .barclays .barefoot .bargains .baseball .basketball .bauhaus .bayern .bb .bbc .bbt .bbva .bcg .bcn .bd .be .beats .beauty .beer .bentley .berlin .best .bestbuy .bet .bf .bg .bh .bharti .bi .bible .bid .bike .bing .bingo .bio .biz .bj .black .blackfriday .blockbuster .blog .bloomberg .blue .bm .bms .bmw .bn .bnpparibas .bo .boats .boehringer .bofa .bom .bond .boo .book .booking .bosch .bostik .boston .bot .boutique .box .br .bradesco .bridgestone .broadway .broker .brother .brussels .bs .bt .budapest .bugatti .build .builders .business .buy .buzz .bv .bw .by .bz .bzh

C

.ca .cab .cafe .cal .call .calvinklein .cam .camera .camp .cancerresearch .canon .capetown .capital .capitalone .car .caravan .cards .care .career .careers .cars .casa .case .caseih .cash .casino .cat .catering .catholic .cba .cbn .cbre .cbs .cc .cd .center .ceo .cern .cf .cfa .cfd .cg .ch .chanel .channel .charity .chase .chat .cheap .chintai .christmas .chrome .church .ci .cipriani .circle .cisco .citadel .citi .citic .city .cityeats .ck .cl .claims .cleaning .click .clinic .clinique .clothing .cloud .club .clubmed .cm .cn .co .coach .codes .coffee .college .cologne .com .comcast .commbank .community .company .compare .computer .comsec .condos .construction .consulting .contact .contractors .cooking .cookingchannel .cool .coop .corsica .country .coupon .coupons .courses .cpa .cr .credit .creditcard .creditunion .cricket .crown .crs .cruise .cruises .csc .cu .cuisinella .cv .cw .cx .cy .cymru .cyou .cz

D

.dabur .dad .dance .data .date .dating .datsun .day .dclk .dds .de .deal .dealer .deals .degree .delivery .dell .deloitte .delta .democrat .dental .dentist .desi .design .dev .dhl .diamonds .diet .digital .direct .directory .discount .discover .dish .diy .dj .dk .dm .dnp .do .docs .doctor .dog .domains .dot .download .drive .dtv .dubai .duck .dunlop .dupont .durban .dvag .dvr .dz

E

.earth .eat .ec .eco .edeka .edu .education .ee .eg .email .emerck .energy .engineer .engineering .enterprises .epson .equipment .er .ericsson .erni .es .esq .estate .et .etisalat .eu .eurovision .eus .events .exchange .expert .exposed .express .extraspace

F

.fage .fail .fairwinds .faith .family .fan .fans .farm .farmers .fashion .fast .fedex .feedback .ferrari .ferrero .fi .fiat .fidelity .fido .film .final .finance .financial .fire .firestone .firmdale .fish .fishing .fit .fitness .fj .fk .flickr .flights .flir .florist .flowers .fly .fm .fo .foo .food .foodnetwork .football .ford .forex .forsale .forum .foundation .fox .fr .free .fresenius .frl .frogans .frontdoor .frontier .ftr .fujitsu .fujixerox .fun .fund .furniture .futbol .fyi

G

.ga .gal .gallery .gallo .gallup .game .games .gap .garden .gay .gb .gbiz .gd .gdn .ge .gea .gent .genting .george .gf .gg .ggee .gh .gi .gift .gifts .gives .giving .gl .glade .glass .gle .global .globo .gm .gmail .gmbh .gmo .gmx .gn .godaddy .gold .goldpoint .golf .goo .goodyear .goog .google .gop .got .gov .gp .gq .gr .grainger .graphics .gratis .green .gripe .grocery .group .gs .gt .gu .guardian .gucci .guge .guide .guitars .guru .gw .gy

H

.hair .hamburg .hangout .haus .hbo .hdfc .hdfcbank .health .healthcare .help .helsinki .here .hermes .hgtv .hiphop .hisamitsu .hitachi .hiv .hk .hkt .hm .hn .hockey .holdings .holiday .homedepot .homegoods .homes .homesense .honda .horse .hospital .host .hosting .hot .hoteles .hotels .hotmail .house .how .hr .h**c .ht .hu .hughes .hyatt .hyundai

I

.ibm .icbc .ice .icu .id .ie .ieee .ifm .ikano .il .im .imamat .imdb .immo .immobilien .in .inc .industries .infiniti .info .ing .ink .institute .insurance .insure .int .international .intuit .investments .io .ipiranga .iq .ir .irish .is .i**aili .ist .istanbul .it .itau .itv .iveco

J

.jaguar .java .jcb .je .jeep .jetzt .jewelry .jio .jll .jm .jmp .jnj .jo .jobs .joburg .jot .joy .jp .jpmorgan .jprs .juegos .juniper

K

.kaufen .kddi .ke .kerryhotels .kerrylogistics .kerryproperties .kfh .kg .kh .ki .kia .kim .kinder .kindle .kitchen .kiwi .km .kn .koeln .komatsu .kosher .kp .kpmg .kpn .kr .krd .kred .kuokgroup .kw .ky .kyoto .kz

L

.Ltd .La .Lacaixa .Lamborghini .Lamer .Lancaster .Lancia .Land .Landrover .Lanxess .Lasalle .Lat .Latino .Latrobe .Law .Law

客户端与服务器端的通讯,C++书写步骤。

C++通过socket编程实现服务端与客户端的通讯,代码如下(个人环境下测试正常,如果遇到运行send发送报错,请检查服务器端口是否被占用,调试的时候请先运行服务端程序在运行客服端,一定要加载库函数ws2_32.lib,发送字符时应该多加一个空字符作为结束字符):

服务器端程序:

// Server.cpp : Defines the entry point for the console application.

#include "winsock2.h"

#pragma comment(lib, "ws2_32.lib")

#include iostream

using namespace std;

int main(int argc, char* argv[])

{

    const int BUF_SIZE = 64;

    WSADATA            wsd;            //WSADATA变量

    SOCKET            sServer;        //服务器套接字

    SOCKET            sClient;        //客户端套接字

    SOCKADDR_IN        addrServ        //服务器地址

    char            buf[BUF_SIZE];    //接收数据缓冲区

    char            sendBuf[BUF_SIZE];//返回给客户端得数据

    int                retVal;            //返回值

    //初始化套结字动态库

    if (WSAStartup(MAKEWORD(2,2), wsd) != 0)

    {

        cout  "WSAStartup failed!"  endl;

        return 1;

    }

    

    //创建套接字

    sServer = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);    

    if(INVALID_SOCKET == sServer)

    {

        cout  "socket failed!"  endl;

        WSACleanup();//释放套接字资源;

        return  -1;

    }

    

    //服务器套接字地址 

    addrServ.sin_family = AF_INET;

    addrServ.sin_port = htons(4999);

    addrServ.sin_addr.s_addr = INADDR_ANY;        

    //绑定套接字

    retVal = bind(sServer, (LPSOCKADDR)addrServ, sizeof(SOCKADDR_IN));

    if(SOCKET_ERROR == retVal)

    {    

        cout  "bind failed!"  endl;

        closesocket(sServer);    //关闭套接字

        WSACleanup();            //释放套接字资源;

        return -1;

    }

    

    //开始监听 

    retVal = listen(sServer, 1);

    if(SOCKET_ERROR == retVal)

    {

        cout  "listen failed!"  endl;        

        closesocket(sServer);    //关闭套接字

        WSACleanup();            //释放套接字资源;

        return -1;

    }

    

    //接受客户端请求

    sockaddr_in addrClient;

    int addrClientlen = sizeof(addrClient);

    sClient = accept(sServer,(sockaddr FAR*)addrClient, addrClientlen);

    if(INVALID_SOCKET == sClient)

    {

        cout  "accept failed!"  endl;        

        closesocket(sServer);    //关闭套接字

        WSACleanup();            //释放套接字资源;

        return -1;

    }

    

    while(true)

    {

        //接收客户端数据

        ZeroMemory(buf, BUF_SIZE);

        retVal = recv(sClient, buf, BUF_SIZE, 0);

        if (SOCKET_ERROR == retVal)

        {

            cout  "recv failed!"  endl;        

            closesocket(sServer);    //关闭套接字

            closesocket(sClient);    //关闭套接字        

            WSACleanup();            //释放套接字资源;

            return -1;

        }

        if(buf[0] == '0')

            break;

        cout  "客户端发送的数据: "  buf endl;

        

        cout  "向客户端发送数据: " ;

        cin  sendBuf;

        

        send(sClient, sendBuf, strlen(sendBuf), 0);

    }

    

    //退出

    closesocket(sServer);    //关闭套接字

    closesocket(sClient);    //关闭套接字

    WSACleanup();            //释放套接字资源;

    

    return 0;

}

客户端程序:

#include "winsock2.h"

#include iostream

#pragma comment(lib, "ws2_32.lib")

using namespace std;

BOOL RecvLine(SOCKET s, char* buf); //读取一行数据

int main(int argc, char* argv[])

{

const int BUF_SIZE = 64;

WSADATA wsd; //WSADATA变量

SOCKET sHost; //服务器套接字

SOCKADDR_IN servAddr; //服务器地址

char buf[BUF_SIZE]; //接收数据缓冲区

char bufRecv[BUF_SIZE];

int retVal; //返回值

//初始化套结字动态库

if (WSAStartup(MAKEWORD(2,2), wsd) != 0)

{

cout  "WSAStartup failed!"  endl;

return -1;

}

//创建套接字

sHost = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

if(INVALID_SOCKET == sHost)

{

cout  "socket failed!"  endl;

WSACleanup();//释放套接字资源

return  -1;

}

//设置服务器地址和端口

servAddr.sin_family =AF_INET;

servAddr.sin_addr.s_addr = inet_addr("127.0.0.1");

servAddr.sin_port = htons((short)4999);

int nServAddlen  = sizeof(servAddr);

//连接服务器

retVal=connect(sHost,(LPSOCKADDR)servAddr, sizeof(servAddr));

if(SOCKET_ERROR == retVal)

{

cout  "connect failed!"  endl;

closesocket(sHost); //关闭套接字

WSACleanup(); //释放套接字资源

return -1;

}

while(true)

{

//向服务器发送数据

ZeroMemory(buf, BUF_SIZE);

cout  " 向服务器发送数据:  ";

cin  buf;

retVal = send(sHost, buf, strlen(buf), 0);

if (SOCKET_ERROR == retVal)

{

cout  "send failed!"  endl;

closesocket(sHost); //关闭套接字

WSACleanup(); //释放套接字资源

return -1;

}

//RecvLine(sHost, bufRecv);

ZeroMemory(bufRecv, BUF_SIZE);

recv(sHost, bufRecv,BUF_SIZE , 0); // 接收服务器端的数据, 只接收5个字符

cout  endl "从服务器接收数据:" bufRecv;

cout"\n";

}

//退出

closesocket(sHost); //关闭套接字

WSACleanup(); //释放套接字资源

return 0;

}

赞(0)
文章名称:《zerohost(zerohosts)》
文章链接:https://www.fzvps.com/244476.html
本站文章来源于互联网,如有侵权,请联系管理删除,本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
图片版权归属各自创作者所有,图片水印出于防止被无耻之徒盗取劳动成果的目的。

评论 抢沙发

评论前必须登录!