[{"data":1,"prerenderedAt":870},["ShallowReactive",2],{"navigation":3,"\u002Fclient\u002Fdebugging":129,"\u002Fclient\u002Fdebugging-surround":865},[4,27,65,107,125],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"MSRV","\u002Fgetting-started\u002Fmsrv","1.getting-started\u002F9.msrv",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Client","i-lucide-plug-zap","\u002Fclient","2.client",[33,37,41,45,49,53,57,61],{"title":34,"path":35,"stem":36},"Configuration","\u002Fclient\u002Fconfiguration","2.client\u002F1.configuration",{"title":38,"path":39,"stem":40},"Events and acks","\u002Fclient\u002Fevents-and-acks","2.client\u002F2.events-and-acks",{"title":42,"path":43,"stem":44},"Connection state","\u002Fclient\u002Fconnection-state","2.client\u002F3.connection-state",{"title":46,"path":47,"stem":48},"Transports and proxies","\u002Fclient\u002Ftransports-and-proxies","2.client\u002F4.transports-and-proxies",{"title":50,"path":51,"stem":52},"TLS","\u002Fclient\u002Ftls","2.client\u002F5.tls",{"title":54,"path":55,"stem":56},"Errors","\u002Fclient\u002Ferrors","2.client\u002F6.errors",{"title":58,"path":59,"stem":60},"Debugging","\u002Fclient\u002Fdebugging","2.client\u002F7.debugging",{"title":62,"path":63,"stem":64},"Blocking client","\u002Fclient\u002Fblocking","2.client\u002F8.blocking",{"title":66,"icon":67,"path":68,"stem":69,"children":70,"page":26},"Tauri plugin","i-simple-icons-tauri","\u002Ftauri","3.tauri",[71,75,79,83,87,91,95,99,103],{"title":72,"path":73,"stem":74},"Setup","\u002Ftauri\u002Fsetup","3.tauri\u002F1.setup",{"title":76,"path":77,"stem":78},"JavaScript API","\u002Ftauri\u002Fjavascript-api","3.tauri\u002F2.javascript-api",{"title":80,"path":81,"stem":82},"Rust API","\u002Ftauri\u002Frust-api","3.tauri\u002F3.rust-api",{"title":84,"path":85,"stem":86},"Permissions","\u002Ftauri\u002Fpermissions","3.tauri\u002F4.permissions",{"title":88,"path":89,"stem":90},"Security","\u002Ftauri\u002Fsecurity","3.tauri\u002F5.security",{"title":92,"path":93,"stem":94},"Messages and errors","\u002Ftauri\u002Fmessages-and-errors","3.tauri\u002F6.messages-and-errors",{"title":96,"path":97,"stem":98},"Troubleshooting","\u002Ftauri\u002Ftroubleshooting","3.tauri\u002F7.troubleshooting",{"title":100,"path":101,"stem":102},"Example app","\u002Ftauri\u002Fexample","3.tauri\u002F8.example",{"title":104,"path":105,"stem":106},"Plugin changelog","\u002Ftauri\u002Fchangelog","3.tauri\u002F9.changelog",{"title":108,"icon":109,"path":110,"stem":111,"children":112,"page":26},"Guides","i-lucide-book-open","\u002Fguides","4.guides",[113,117,121],{"title":114,"path":115,"stem":116},"Migration from rust_socketio","\u002Fguides\u002Fmigration","4.guides\u002F1.migration",{"title":118,"path":119,"stem":120},"Comparison","\u002Fguides\u002Fcomparison","4.guides\u002F2.comparison",{"title":122,"path":123,"stem":124},"Contributing","\u002Fguides\u002Fcontributing","4.guides\u002F3.contributing",{"title":126,"path":127,"stem":128},"Changelog","\u002Fchangelog","9.changelog",{"id":130,"title":58,"body":131,"description":859,"extension":860,"links":861,"meta":862,"navigation":409,"path":59,"seo":863,"stem":60,"__hash__":864},"docs\u002F2.client\u002F7.debugging.md",{"type":132,"value":133,"toc":853},"minimark",[134,139,158,218,254,314,343,366,370,376,567,571,581,584,849],[135,136,138],"h2",{"id":137},"logs","Logs",[140,141,142,143,153,154,157],"p",{},"The crate logs through ",[144,145,149],"a",{"href":146,"rel":147},"https:\u002F\u002Fdocs.rs\u002Ftracing",[148],"nofollow",[150,151,152],"code",{},"tracing"," under the ",[150,155,156],{},"socketio_next"," target:",[159,160,161,174],"table",{},[162,163,164],"thead",{},[165,166,167,171],"tr",{},[168,169,170],"th",{},"Level",[168,172,173],{},"What",[175,176,177,188,198,208],"tbody",{},[165,178,179,185],{},[180,181,182],"td",{},[150,183,184],{},"info",[180,186,187],{},"connected (sid, transport, recovered), reconnecting (attempt, delay), closed (reason)",[165,189,190,195],{},[180,191,192],{},[150,193,194],{},"warn",[180,196,197],{},"disconnected (reason, error), connect \u002F reconnect attempt failed, ping timeout",[165,199,200,205],{},[180,201,202],{},[150,203,204],{},"debug",[180,206,207],{},"engine.io handshake (sid, upgrades, ping interval \u002F timeout, maxPayload), transport chosen \u002F upgraded, every state",[165,209,210,215],{},[180,211,212],{},[150,213,214],{},"trace",[180,216,217],{},"every packet in and out (type, namespace, ack id, size)",[219,220,225],"pre",{"className":221,"code":222,"language":223,"meta":224,"style":224},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","RUST_LOG=socketio_next=debug cargo run\n","sh","",[150,226,227],{"__ignoreMap":224},[228,229,232,236,240,242,244,247,251],"span",{"class":230,"line":231},"line",1,[228,233,235],{"class":234},"sTEyZ","RUST_LOG",[228,237,239],{"class":238},"sMK4o","=",[228,241,156],{"class":234},[228,243,239],{"class":238},[228,245,204],{"class":246},"sfazB",[228,248,250],{"class":249},"sBMFI"," cargo",[228,252,253],{"class":246}," run\n",[219,255,259],{"className":256,"code":257,"language":258,"meta":224,"style":224},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","tracing_subscriber::fmt()\n    .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())\n    .init();\n","rust",[150,260,261,276,303],{"__ignoreMap":224},[228,262,263,266,269,273],{"class":230,"line":231},[228,264,265],{"class":249},"tracing_subscriber",[228,267,268],{"class":238},"::",[228,270,272],{"class":271},"s2Zo4","fmt",[228,274,275],{"class":238},"()\n",[228,277,279,282,285,288,290,292,295,297,300],{"class":230,"line":278},2,[228,280,281],{"class":238},"    .",[228,283,284],{"class":271},"with_env_filter",[228,286,287],{"class":238},"(",[228,289,265],{"class":249},[228,291,268],{"class":238},[228,293,294],{"class":249},"EnvFilter",[228,296,268],{"class":238},[228,298,299],{"class":271},"from_default_env",[228,301,302],{"class":238},"())\n",[228,304,306,308,311],{"class":230,"line":305},3,[228,307,281],{"class":238},[228,309,310],{"class":271},"init",[228,312,313],{"class":238},"();\n",[140,315,316,317,320,321,324,325,328,329,328,332,328,335,338,339,342],{},"Every event carries a ",[150,318,319],{},"socketio{nsp, url}"," span. Query values are shown as ",[150,322,323],{},"***"," (only ",[150,326,327],{},"EIO",", ",[150,330,331],{},"transport",[150,333,334],{},"sid",[150,336,337],{},"t"," stay visible); ",[150,340,341],{},"redact_query(false)"," turns that off.",[344,345,346],"warning",{},[140,347,348,349,351,352,355,356,358,359,361,362,365],{},"Only ",[150,350,156],{}," targets are redacted. tungstenite logs the full websocket handshake request (URL with query, headers) with the ",[150,353,354],{},"log"," crate at trace level; if you bridge ",[150,357,354],{}," into ",[150,360,152],{},", keep ",[150,363,364],{},"tungstenite=info"," or higher when the query carries secrets.",[135,367,369],{"id":368},"packet-inspector","Packet inspector",[140,371,372,375],{},[150,373,374],{},"inspect_packets"," sees every socket.io packet in and out, after decoding \u002F before encoding. It runs on the connection task, so keep it quick; a panicking inspector is logged, not fatal.",[219,377,379],{"className":256,"code":378,"language":258,"meta":224,"style":224},"use socketio_next::{ClientBuilder, Direction};\n\nlet client = ClientBuilder::new(url)\n    .inspect_packets(|direction: Direction, packet| match direction {\n        Direction::Incoming => println!(\"\u003C- {packet:?}\"),\n        Direction::Outgoing => println!(\"-> {packet:?}\"),\n    })\n    .connect()\n    .await?;\n",[150,380,381,405,411,438,474,511,540,546,556],{"__ignoreMap":224},[228,382,383,387,390,393,396,399,402],{"class":230,"line":231},[228,384,386],{"class":385},"sbssI","use",[228,388,389],{"class":249}," socketio_next",[228,391,392],{"class":238},"::{",[228,394,395],{"class":249},"ClientBuilder",[228,397,398],{"class":238},",",[228,400,401],{"class":249}," Direction",[228,403,404],{"class":238},"};\n",[228,406,407],{"class":230,"line":278},[228,408,410],{"emptyLinePlaceholder":409},true,"\n",[228,412,413,417,420,422,425,427,430,432,435],{"class":230,"line":305},[228,414,416],{"class":415},"spNyl","let",[228,418,419],{"class":234}," client ",[228,421,239],{"class":238},[228,423,424],{"class":249}," ClientBuilder",[228,426,268],{"class":238},[228,428,429],{"class":271},"new",[228,431,287],{"class":238},[228,433,434],{"class":234},"url",[228,436,437],{"class":238},")\n",[228,439,441,443,445,448,451,454,456,458,461,464,468,471],{"class":230,"line":440},4,[228,442,281],{"class":238},[228,444,374],{"class":271},[228,446,447],{"class":238},"(|",[228,449,450],{"class":234},"direction",[228,452,453],{"class":238},":",[228,455,401],{"class":249},[228,457,398],{"class":238},[228,459,460],{"class":234}," packet",[228,462,463],{"class":238},"|",[228,465,467],{"class":466},"s7zQu"," match",[228,469,470],{"class":234}," direction ",[228,472,473],{"class":238},"{\n",[228,475,477,480,482,485,488,491,493,496,499,502,505,508],{"class":230,"line":476},5,[228,478,479],{"class":249},"        Direction",[228,481,268],{"class":238},[228,483,484],{"class":249},"Incoming",[228,486,487],{"class":238}," =>",[228,489,490],{"class":271}," println!",[228,492,287],{"class":238},[228,494,495],{"class":238},"\"",[228,497,498],{"class":246},"\u003C- ",[228,500,501],{"class":238},"{",[228,503,504],{"class":246},"packet:?",[228,506,507],{"class":238},"}\"",[228,509,510],{"class":238},"),\n",[228,512,514,516,518,521,523,525,527,529,532,534,536,538],{"class":230,"line":513},6,[228,515,479],{"class":249},[228,517,268],{"class":238},[228,519,520],{"class":249},"Outgoing",[228,522,487],{"class":238},[228,524,490],{"class":271},[228,526,287],{"class":238},[228,528,495],{"class":238},[228,530,531],{"class":246},"-> ",[228,533,501],{"class":238},[228,535,504],{"class":246},[228,537,507],{"class":238},[228,539,510],{"class":238},[228,541,543],{"class":230,"line":542},7,[228,544,545],{"class":238},"    })\n",[228,547,549,551,554],{"class":230,"line":548},8,[228,550,281],{"class":238},[228,552,553],{"class":271},"connect",[228,555,275],{"class":238},[228,557,559,561,564],{"class":230,"line":558},9,[228,560,281],{"class":238},[228,562,563],{"class":466},"await",[228,565,566],{"class":238},"?;\n",[135,568,570],{"id":569},"link-info","Link info",[140,572,573,576,577,580],{},[150,574,575],{},"client.link_info()"," shows the transport, the sids, ping interval \u002F timeout, the last ping and packet, attempts, pending acks, traffic counters and sessions; see ",[144,578,42],{"href":579},"\u002Fclient\u002Fconnection-state#link-info",".",[135,582,96],{"id":583},"troubleshooting",[159,585,586,596],{},[162,587,588],{},[165,589,590,593],{},[168,591,592],{},"Symptom",[168,594,595],{},"Check",[175,597,598,612,629,644,655,669,683,701,723,733,757,779,798,818,837],{},[165,599,600,609],{},[180,601,602,605,606],{},[150,603,604],{},"Engine(InvalidHandshake(\"... Engine.IO v3 ...\"))"," or ",[150,607,608],{},"IncompatibleServer",[180,610,611],{},"The server runs socket.io 2.x. This client needs socket.io 3 or newer.",[165,613,614,619],{},[180,615,616],{},[150,617,618],{},"ConnectTimeout",[180,620,621,622,625,626,580],{},"Wrong host \u002F port \u002F path, a proxy that swallows the request, or a server that is not socket.io. Try ",[150,623,624],{},"transport_type(TransportType::Polling)"," and ",[150,627,628],{},"RUST_LOG=socketio_next=debug",[165,630,631,634],{},[180,632,633],{},"Websocket blocked by a proxy",[180,635,636,639,640,643],{},[150,637,638],{},"TransportType::Any"," (default) falls back to polling; ",[150,641,642],{},"Polling"," never tries the websocket.",[165,645,646,652],{},[180,647,648,651],{},[150,649,650],{},"HttpStatus { status: 400 }"," after a server restart",[180,653,654],{},"The old session id is gone; the client reconnects with a new one.",[165,656,657,662],{},[180,658,659],{},[150,660,661],{},"HttpStatus { status: 400, message: \"Session ID unknown\" }",[180,663,664,665,668],{},"The server forgot the session (restart, or another node behind a load balancer without sticky sessions: enable ",[150,666,667],{},"cookies"," if the balancer pins by cookie).",[165,670,671,677],{},[180,672,673,676],{},[150,674,675],{},"HttpStatus { status: 403 }"," \u002F CORS",[180,678,679,680,580],{},"CORS does not apply to non-browser clients; a 403 comes from a proxy or the server's ",[150,681,682],{},"allowRequest",[165,684,685,690],{},[180,686,687],{},[150,688,689],{},"ConnectRejected { message, data }",[180,691,692,693,696,697,700],{},"The namespace middleware refused the auth (",[150,694,695],{},"next(new Error(message))","), or the namespace does not exist (",[150,698,699],{},"Invalid namespace","). The client does not retry.",[165,702,703,709],{},[180,704,705,706],{},"TLS: ",[150,707,708],{},"invalid peer certificate",[180,710,711,712,715,716,719,720,580],{},"A private CA: ",[150,713,714],{},"tls_config(TlsConfig::with_root_certificates_pem(&pem)?)","; or the ",[150,717,718],{},"platform-verifier"," feature, or ",[150,721,722],{},"native-tls",[165,724,725,730],{},[180,726,727],{},[150,728,729],{},"WebsocketClosed { code, reason }",[180,731,732],{},"The server or a proxy closed the websocket on purpose; the code says why (1001 going away, 1008 policy, 4xxx the application's).",[165,734,735,738],{},[180,736,737],{},"Corporate proxy",[180,739,740,741,744,745,748,749,752,753,756],{},"Set ",[150,742,743],{},"HTTPS_PROXY"," \u002F ",[150,746,747],{},"HTTP_PROXY"," or call ",[150,750,751],{},"proxy(..)","; ",[150,754,755],{},"ProxyFailed"," says what the proxy answered.",[165,758,759,762],{},[180,760,761],{},"Token expired, reconnects keep failing",[180,763,764,765,744,768,771,772,775,776,580],{},"Return the fresh token from ",[150,766,767],{},"auth_with",[150,769,770],{},"connect_params_with","; after ",[150,773,774],{},"ReconnectFailed"," call ",[150,777,778],{},"reconnect()",[165,780,781,786],{},[180,782,783],{},[150,784,785],{},"TlsNotEnabled",[180,787,788,789,792,793,605,796,580],{},"Built with ",[150,790,791],{},"default-features = false","; enable ",[150,794,795],{},"rustls",[150,797,722],{},[165,799,800,805],{},[180,801,802],{},[150,803,804],{},"TlsProviderMissing",[180,806,807,808,792,811,813,814,817],{},"Another crate enabled reqwest's ",[150,809,810],{},"rustls-no-provider",[150,812,795],{}," (",[144,815,50],{"href":816},"\u002Fclient\u002Ftls#reqwest-and-rustls-no-provider",").",[165,819,820,823],{},[180,821,822],{},"Large messages fail",[180,824,825,826,829,830,833,834,817],{},"The server's ",[150,827,828],{},"maxHttpBufferSize"," (engine.io ",[150,831,832],{},"maxPayload",", see ",[150,835,836],{},"link_info().max_payload",[165,838,839,842],{},[180,840,841],{},"Events with no handler",[180,843,844,845,848],{},"Handlers are matched by exact name; ",[150,846,847],{},"on_any"," sees everything.",[850,851,852],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":224,"searchDepth":278,"depth":305,"links":854},[855,856,857,858],{"id":137,"depth":278,"text":138},{"id":368,"depth":278,"text":369},{"id":569,"depth":278,"text":570},{"id":583,"depth":278,"text":96},"tracing output, redaction, the packet inspector and a troubleshooting table.","md",null,{},{"title":58,"description":859},"6GvArzbG268XyvsllMjV1FiB-L3eDhzzB1A3PQpmxI8",[866,868],{"title":54,"path":55,"stem":56,"description":867,"children":-1},"One typed, cloneable Error; engine errors; what each one means.",{"title":62,"path":63,"stem":64,"description":869,"children":-1},"The same client without async, behind the blocking feature.",1795285663938]